Git and GitHub for Beginners
Git & GitHub Full Stack Journey ⏱ Read time â€ĸ calculatingâ€Ļ

Git & GitHub Step-by-Step Guide for Beginners

Author Avatar
By: Sajid A. Rabby
đŸ—“ī¸ Nov 17, 2025 â€ĸ 0 words

🚀 Why Git & GitHub Matter for Your Career

If you want to become a full stack developer, backend engineer, or even a serious frontend dev, you must understand Git and GitHub. They are the standard tools for version control and collaboration in almost every modern software team.

The good news? You don’t need to be a “pro coder” to start. In this guide, we’ll walk through Git & GitHub step by step, in simple language, with real examples that match how people actually work in IT and development.

Read this guide slowly, and keep your VS Code + terminal open. The best way to learn Git is: see → type → break → fix.

1ī¸âƒŖ What Are Git and GitHub (In Human Language)?

🔹 Git = Version Control System

Git is a local tool installed on your machine. It tracks changes to your project files over time. Think of it like a super-smart “time machine” for your code.

With Git, you can:

🔹 GitHub = Online Git Repository Hosting

GitHub is a website that hosts your Git repositories online. It lets you:

Shortcut: Git = engine on your PC, GitHub = parking + sharing on the internet.

2ī¸âƒŖ Key Concepts You Must Know Before Commands

đŸ“Ļ Repository (repo)

A repository is simply a project folder tracked by Git.

📝 Commit

A commit is a snapshot of your files at a specific point in time, with a message describing what changed.

đŸŒŋ Branch

A branch is a separate line of work. You usually have:

â˜ī¸ Remote

A remote is the connection between your local repo and a remote server (e.g., GitHub). Most of the time, it is called origin.

3ī¸âƒŖ Step 1 – Install Git and Do Basic Setup

đŸ’ģ Install Git

âš™ī¸ Configure Your Identity (Run Once per Machine)

Open Command Prompt / Terminal and run:

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

This information appears in your commits and on GitHub history.

4ī¸âƒŖ Step 2 – Create Your First Local Repository

🔧 Option A – Start from an Existing Folder

Imagine you already have a project folder:

my-html-project/
  index.html
  style.css

Open terminal in that folder and run:

git init

This:

🔧 Option B – Create a New Folder

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

5ī¸âƒŖ Step 3 – Check Status, Add Files, Make Your First Commit

🔍 Check What’s Going On

git status

You will see:

➕ Add Files to Staging Area

To track all files:

git add .

Or add a single file:

git add index.html

✅ Create Your First Commit

git commit -m "Initial commit: basic HTML structure"

Now Git has stored a snapshot of your project. You can continue making changes and committing them with clear messages.

6ī¸âƒŖ Step 4 – Understand the Commit History

📜 View History

git log

Press Q to exit the log view.

Shorter version:

git log --oneline
Good habit: Write meaningful commit messages, like "Add navbar and hero section", not just "update" or "fix".

7ī¸âƒŖ Step 5 – Working with Branches (Simple Use Case)

🌱 Create & Switch to a New Branch

Let’s create a branch for a new feature:

git checkout -b feature/contact-form

This:

🔁 Switch Between Branches

git checkout main
git checkout feature/contact-form

đŸŒŋ Merge a Branch Back to Main

After finishing your feature:

git checkout main
git merge feature/contact-form

8ī¸âƒŖ Step 6 – Create a GitHub Repository

Go to github.com and:

  1. Create a free account (if you don’t have one).
  2. Click New → create a repository name (e.g., my-first-git-project).
  3. Choose Public or Private.
  4. Leave “Initialize with README” unchecked if you already have code locally.

9ī¸âƒŖ Step 7 – Connect Local Repo to GitHub (Remote)

In your project folder, add GitHub as a remote:

git remote add origin https://github.com/your-username/my-first-git-project.git

âŦ†ī¸ Push Your Local Code to GitHub

git branch -M main
git push -u origin main

Now your code is live on GitHub under that repository. From now on, you can push changes with:

git push

🔟 Step 8 – Cloning a Project from GitHub

If you want to download an existing project from GitHub:

git clone https://github.com/someone/project-name.git

This:

1ī¸âƒŖ1ī¸âƒŖ Step 9 – Basic Collaboration Flow

Common daily flow with a team:

  1. Pull latest changes: git pull
  2. Create feature branch: git checkout -b feature/login
  3. Code, then stage & commit: git add . → git commit -m "Add login form UI"
  4. Push feature branch: git push -u origin feature/login
  5. Create Pull Request in GitHub → ask for review → merge.

1ī¸âƒŖ2ī¸âƒŖ Step 10 – Common Git Commands Cheat Sheet

Reality check: Everyone breaks Git at some point (including seniors). Don’t panic – commit often, push regularly, and you’ll always have a place to roll back.

✅ Final Thoughts: How to Learn Git & GitHub Practically

Don’t just read tutorials. Take a small project — even a simple HTML/CSS landing page — and:

If you repeat this process a few times, Git & GitHub will stop feeling “scary” and start feeling like a normal part of your workflow.

Back to Blog