Git

Version Control

·View all resources →

Git Learning Roadmap

Git is the version control system used by virtually every software team on earth. It tracks every change to your codebase, lets multiple developers work simultaneously without stepping on each other, and enables the CI/CD pipelines that deploy code to production. Git is non-negotiable — you cannot get a software job without it.

Total time

3–6 weeks

Stages

4 stages

Job-ready at

Stage 3

Career paths

4 paths

1
2
3
4

Before you start — Prerequisites

✓

Basic command-line usage

All Git commands run in a terminal. You need to be comfortable with navigating directories and running commands.

✓

Any programming language or text editor

You need files to version control — Git is always used alongside actual code.

1

Stage 1: Git Essentials

Track your work, never lose a change

1 week

Topics to cover

git init and git cloneThe three areas: working tree, staging, repositorygit add and git statusgit commit: writing good commit messagesgit log and git showgit diff: working tree vs staged vs committed.gitignore: excluding files from trackinggit restore: discard working tree changesgit rm and git mvGit global config: user.name and user.email

Bold = especially important

Milestone

You track every change to a project, write clear commit messages, and never lose work. The staging area feels natural.

Project to build

Version-controlled personal project

Create a new project, make 10+ meaningful commits with good messages, use .gitignore correctly — full history tells a story.

2

Stage 2: Branches & Merging

Work on multiple things simultaneously

1–2 weeks

Topics to cover

git branch: create, list, deletegit checkout and git switchFeature branch workflowgit merge: fast-forward and three-way mergeMerge conflicts: understand, resolve, commitgit stash: temporary shelvingDetached HEAD state — what it isBranch naming conventionsgit log --graph for visual branch historyTagging releases: git tag

Bold = especially important

Milestone

You work on multiple features simultaneously with branches and resolve merge conflicts confidently — the core of team collaboration.

Project to build

Feature branch + merge workflow

Create 3 feature branches, make commits on each, merge two into main, intentionally create and resolve a merge conflict.

3

Stage 3: Remote Repos & GitHub

✓ Min. Job Ready

Collaborate with a team

1–2 weeks

Topics to cover

git remote: add, show, removegit push and git pullgit fetch vs git pullPull requests: open, review, mergeForking and contributing to open sourceSSH keys for GitHub authenticationProtected branches and merge rulesCode review etiquetteGitHub Issues and ProjectsGitHub Actions: basic CI on push

Bold = especially important

Milestone

You collaborate on a shared GitHub repository, open pull requests, review code, and have your work CI-checked automatically on every push.

Project to build

Open-source contribution

Fork a public repo, fix a bug or improve docs, push to your fork, open a pull request — real collaboration with a real team.

4

Stage 4: Rewriting History & Advanced Git

Clean, professional commit history

1–2 weeks

Topics to cover

git rebase: replay commits on a new baseInteractive rebase: squash, fixup, rewordgit cherry-pick: apply a specific commitgit revert vs git resetgit reflog: the safety net for mistakesgit bisect: binary search for a buggit blame: find who changed a lineSubmodules: repos inside reposgit hooks: pre-commit, pre-push automationCommit signing with GPG or SSH

Bold = especially important

Milestone

You rebase, squash, and cherry-pick confidently. Your commit history is clean and readable. You can find any bug with git bisect.

Project to build

Clean up a messy branch

Interactive rebase to squash WIP commits, reword vague messages, reorder commits logically — before/after comparison.

Frequently asked questions

Is Git the same as GitHub?

No. Git is the version control system — a tool that runs on your computer to track changes. GitHub is a website that hosts Git repositories in the cloud and adds collaboration features (pull requests, issues, code review). GitLab and Bitbucket are alternatives. You use Git locally, then push to GitHub to share with teammates.

How long does it take to learn Git?

The core commands (clone, add, commit, push, pull, branch, merge) — 1 week. Understanding how Git actually works (DAG, refs, staging area) — 2–3 weeks. Advanced Git (rebase, cherry-pick, bisect, submodules) — months of real-world use. Most jobs only need the core commands; the advanced stuff comes naturally on the job.

Should I use Git on the command line or a GUI?

Learn the command line first — it's universal, works over SSH, and forces you to understand what Git is doing. Once you're comfortable, a GUI (GitKraken, Sourcetree, or the built-in VS Code Git panel) is fine to add on top. Never rely on a GUI without understanding the underlying commands.

What is the difference between merge and rebase?

Both integrate changes from one branch into another. Merge creates a merge commit that preserves history as-is — safe and non-destructive. Rebase replays your commits on top of another branch — creates a linear history but rewrites commit hashes. Use merge for long-lived branches and public branches. Use rebase for cleaning up local work before sharing.

How do I fix a mistake in Git?

git revert adds a new commit that undoes a previous commit — safe for shared branches. git reset moves the branch pointer backward — use --soft to keep changes staged, --mixed to unstage, --hard to discard entirely. git stash temporarily shelves uncommitted changes. Most mistakes are recoverable; git reflog is your safety net.

Ready to start learning?

Browse our curated Git resources — every course, book, and video ranked by quality.

View Git Resources →