GitHub Setup (First Step)

1What is GitHub?

GitHub is a cloud-based platform for version control and collaboration that lets you and others work together on projects from anywhere.

Recommended YouTube Tutorials:

GitHub Tutorial
GitHub Tutorial - Beginner's Training Guide
Watch on YouTube
Git and GitHub Crash Course
Git and GitHub for Beginners - Crash Course
Watch on YouTube
Why you need GitHub:
  • Track and manage changes to your code
  • Collaborate with other developers
  • Deploy your projects to services like Render
  • Maintain backup copies of your work
  • Showcase your projects to potential employers
Before proceeding:
  1. Create a free GitHub account at github.com
  2. Install Git on your computer from git-scm.com

2Create Three Repositories

For this project, we recommend creating three separate repositories:

Recommended YouTube Tutorials for Repository Setup:

GitHub Repository Tutorial
How to Create a GitHub Repository
Watch on YouTube

2Create Three Repositories

For this project, we recommend creating three separate repositories:

How to Create a Repository on GitHub:

  1. Go to github.com and log in to your account
  2. Click the "+" icon in the top right corner and select "New repository"
    GitHub new repository button
  3. On the new repository page:
    • Enter your repository name (e.g., "ecommerce-backend")
    • Add a description (optional but recommended)
    • Choose between Public (visible to everyone) or Private (only visible to you and collaborators)
    • Check "Add a README file" (recommended)
    • Add .gitignore template: Select "Node" for backend repositories
    • Choose a license if needed (MIT License is common for open source)
    GitHub repository creation form
  4. Click "Create repository"
Initial Setup for Each Repository:
  1. Clone the repository to your local machine:
    git clone https://github.com/your-username/repository-name.git
    cd repository-name
  2. Configure your .gitignore file (for backend):
    # .gitignore content for Node.js project
    node_modules/
    .env
    .DS_Store
    npm-debug.log*
  3. Make your first commit:
    git add .
    git commit -m "Initial project setup"
    git push origin main
Important Notes:
  • Never commit sensitive information (like .env files or API keys) to GitHub
  • Make regular commits with descriptive messages
  • Create different branches for new features (git checkout -b feature-name)
GitHub Repository Documentation