Welcome to GitHub Tutorials

Learn Git and GitHub from basics to advanced with step-by-step tutorials, real-world examples, and best practices for developers.

Start Learning for Free

GitHub Beginner Guide (Step by Step)

This page explains GitHub from zero using simple steps and commands.

Step 1: Create GitHub Account

  • Go to https://github.com
  • Click Sign Up
  • Enter Email, Username, Password
  • Verify your email

Step 2: Install Git

  • Download Git from https://git-scm.com
  • Install using default settings
  • Open Git Bash
git --version

Step 3: Configure Git

Set your name and email (used in commits)

git config --global user.name "Your Name"
git config --global user.email "youremail@gmail.com"

Step 4: Generate SSH Key

SSH key is used to connect GitHub securely

ssh-keygen -t ed25519 -C "youremail@gmail.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
clip < ~/.ssh/id_ed25519.pub

Step 5: Add SSH Key to GitHub

  • GitHub → Settings
  • SSH and GPG Keys
  • Click New SSH Key
  • Paste copied key and save
ssh -T git@github.com

Step 6: Create Repository

  • Click + → New Repository
  • Repository name: my-first-repo
  • Select Public/Private
  • Click Create

Step 7: Create Local Project

mkdir my-first-repo
cd my-first-repo
git init

Step 8: Create File

touch README.md
echo "# My First GitHub Project" > README.md

Step 9: Push Code to GitHub

git add .
git commit -m "Initial commit"
git remote add origin git@github.com:USERNAME/my-first-repo.git
git branch -M main
git push -u origin main

Step 10: Daily Git Commands

git status
git pull
git push

Basic Git Flow

Edit → Add → Commit → Push


Section 1: Upload Project Using CMD (Command Line)

Step 1: Open CMD in Project Folder

Go to your project folder, right-click, and select Open in Terminal / CMD.

Step 2: Initialize Git

git init

Step 3: Add Files

git add .

Step 4: Commit Files

git commit -m "Initial commit"

Step 5: Add GitHub Repository URL

git remote add origin https://github.com/USERNAME/REPOSITORY-NAME.git

Step 6: Push Project to GitHub

git branch -M main
git push -u origin main

Your project is now uploaded to GitHub.


Section 2: Upload Project Using GitHub Repository (Website)

Step 1: Create a Repository

  1. Go to github.com
  2. Click +New repository
  3. Enter repository name
  4. Click Create repository

Step 2: Upload Files

  1. Open the repository
  2. Click Add fileUpload files
  3. Select your project files

Step 3: Commit Changes

  1. Add a commit message
  2. Click Commit changes

Your project is uploaded without using CMD.


How to Add People to a Private GitHub Repository

Step 1: Open Repository Settings

Go to your private repository and click on the Settings tab.

Step 2: Open Collaborators

From the left menu, select Collaborators.

Step 3: Add a Person

  1. Click Add people
  2. Enter GitHub username or email
  3. Click Add

Step 4: Invitation Acceptance

The invited user must accept the GitHub invitation to gain access.

Permissions