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

Step 1: Install Git

  1. Download Git from git-scm.com
  2. Install Git following the installation wizard
  3. 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

  1. Go to github.com and sign in
  2. Click "+" → "New repository"
  3. Repository name: logo-ai-pro (or your preferred name)
  4. Set visibility: Private (recommended) or Public
  5. Do NOT initialize with README (we'll push existing code)
  6. Click "Create repository"
  7. 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 secrets
  • node_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:

  1. Download and install GitHub Desktop
  2. Sign in to your GitHub account
  3. Click "File" → "Add Local Repository"
  4. Select your LogoAIpro project folder
  5. Click "Publish repository"
  6. Name: logo-ai-pro, keep it private, click "Publish Repository"
  7. Commit message: "Initial commit: LogoAIpro v1.0"
  8. Click "Commit to main" then "Push origin"

Step 5: Verify Upload

  1. Go to your GitHub repository page
  2. Verify all files are uploaded:
    • package.json
    • app/ directory
    • components/ directory
    • public/ directory
    • .gitignore
    • README.md
  3. 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:

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