Push Code to GitHub
📦 GitHub Setup: This guide will walk you through setting up a GitHub repository and pushing your LogoAIpro code to GitHub. This is a prerequisite step before deploying to Vercel or AWS EC2.
Requirements
- GitHub account (free)
- Git installed on your computer
- Code editor (VS Code recommended)
- LogoAIpro source code
Step 1: Install Git
- Download Git from git-scm.com
- Install Git following the installation wizard
- Configure Git (first time only):
git config --global user.name "Your Name" git config --global user.email "your.email@example.com"
Step 2: Create GitHub Repository
- Go to github.com and sign in
- Click "+" → "New repository"
- Repository name: logo-ai-pro (or your preferred name)
- Set visibility: Private (recommended) or Public
- Do NOT initialize with README (we'll push existing code)
- Click "Create repository"
- Copy the repository URL (e.g.,
https://github.com/yourusername/logo-ai-pro.git)
Step 3: Initialize Git and Push to GitHub (Command Line)
# Navigate to your LogoAIpro project folder
cd /path/to/logo-ai-envato
# Initialize Git repository
git init
# Add all files
git add .
# Create initial commit
git commit -m "Initial commit: LogoAIpro v1.0"
# Rename branch to main (if needed)
git branch -M main
# Add remote repository
git remote add origin https://github.com/yourusername/logo-ai-pro.git
# Push to GitHub
git push -u origin main
Security Note: Before pushing, ensure your
.gitignore file excludes:
.env.local- Contains API keys and secretsnode_modules/- Dependencies (reinstall with npm install).next/- Build files (regenerated on build).DS_Store- macOS system files
Step 4: Alternative - GitHub Desktop (Optional)
For users who prefer a GUI interface:
- Download and install GitHub Desktop
- Sign in to your GitHub account
- Click "File" → "Add Local Repository"
- Select your LogoAIpro project folder
- Click "Publish repository"
- Name: logo-ai-pro, keep it private, click "Publish Repository"
- Commit message: "Initial commit: LogoAIpro v1.0"
- Click "Commit to main" then "Push origin"
Step 5: Verify Upload
- Go to your GitHub repository page
- Verify all files are uploaded:
-
package.json -
app/directory -
components/directory -
public/directory -
.gitignore -
README.md
-
- Verify sensitive files are NOT uploaded:
- ❌
.env.local(should be in .gitignore) - ❌
node_modules/(should be in .gitignore)
- ❌
Step 6: Update .gitignore (If Needed)
Ensure your .gitignore includes:
# Environment variables
.env.local
.env
.env*.local
# Dependencies
node_modules/
.pnp
.pnp.js
# Build outputs
.next/
out/
dist/
build/
# Testing
coverage/
.nyc_output/
# Misc
.DS_Store
*.log
*.pem
# Debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# IDE
.vscode/
.idea/
*.swp
*.swo
# Temporary files
*.tmp
.cache/Next Steps
Now that your code is on GitHub, you can proceed with deployment:
- Deploy to Vercel (Recommended for beginners, easy setup)
- Deploy to AWS EC2 (Recommended for production, better performance)
Security Reminders:
- Never commit API keys or secrets to GitHub
- Keep your repository private if it contains sensitive information
- Use environment variables for all secrets
- Review your commits before pushing to ensure no secrets are included