Git
Git is the universal tool for tracking code and collaborating. Learn the mental model (the three trees), the everyday cycle (stage, commit, branch, merge), how to work with remotes and pull requests, and — crucially — how to undo almost anything without panic.
- Chapter 01
Git Fundamentals
6 lessons - 01 Why version control Understand how version control lets teams edit the same code in parallel, undo any past mistake, and stop living in a folder of final_v2_FINAL.zip files.
- 02 Install & first-time config Install Git and set the global user identity that every commit will permanently embed.
- 03 The three trees: working, staging, repo Understand the three zones Git uses to track your work — and why a separate staging step gives you precise control over every commit.
- 04 Staging & commits How to stage changes, write good commit messages, and build a history that makes future debugging sane.
- 05 Viewing history: log, diff, show Navigate the commit timeline to find when a line changed, who changed it, and exactly what the change was.
- 06 Ignoring files with .gitignore Keep secrets, build artifacts, and node_modules out of your repository using .gitignore patterns and git rm --cached.
- Chapter 02
Branching & Merging
5 lessons - 07 Branches How branches work as cheap, movable pointers — and how to use them to isolate risky work from stable code.
- 08 Merging How to fold a finished feature branch back into main safely, and what makes fast-forward merges different from true merge commits.
- 09 Resolving merge conflicts Git stopped the merge and printed CONFLICT. Learn why it happens, what the file markers mean, and the exact steps to fix it safely.
- 10 Rebase vs merge Should you merge main into your feature branch or rebase onto it? Learn what each does to history and when to pick which.
- 11 Stashing work in progress How to shelve half-done changes with git stash so you can switch branches instantly, then pick up exactly where you left off.
- Chapter 03
Remotes & Collaboration
2 lessons - 12 Remotes: fetch, pull, push Learn how commits travel between your laptop and GitHub — and how to get your teammates' work back without clobbering anyone.
- 13 The GitHub flow & pull requests How teams ship changes together without chaos — the GitHub Flow loop, what a pull request really is, and how to choose between merge, squash, and rebase.
- Chapter 04
Undoing & Recovery
2 lessons - 14 Undoing changes: restore, reset, revert A precise map of every Git undo command — which tree each one touches, when to use each, and which ones can destroy work permanently.
- 15 reflog & recovering lost work How git reflog records every place HEAD has pointed so you can recover commits that seem lost after a bad reset, deleted branch, or botched rebase.
- End of section 0 / 15 complete
Make it stick — pass every quiz.
Each lesson has a short quiz at the bottom. Passing the quiz is what marks the lesson complete and counts toward your certificate.
Section complete 15 / 15 lessonsNice work — you finished Git.
Certificates are earned per learning path, not per section. Here's where this section takes you:
Pick a learning path to start working toward a certificate.
Git — frequently asked questions
Straight answers to the questions people ask most about git.
What is the difference between Git and GitHub?
Git is the version-control tool that runs on your computer and tracks changes to your files; GitHub is a website that hosts Git repositories online for sharing and collaboration. You can use Git entirely offline, while GitHub (like GitLab or Bitbucket) adds remote backup, pull requests, and team workflows on top.
Read the lessonWhat is the difference between git merge and git rebase?
Merge combines two branches by creating a new merge commit that ties their histories together and preserves exactly what happened; rebase instead replays your commits on top of the target branch, giving a clean linear history but rewriting those commits with new IDs. Use merge to preserve true history on shared branches, and rebase only to tidy a local branch before sharing — never rebase commits others have already pulled.
Read the lessonHow do I undo the last Git commit?
Use git reset to move your branch back: git reset --soft HEAD~1 undoes the commit but keeps your changes staged, while git reset --hard HEAD~1 discards the changes entirely. If the commit was already pushed and shared, use git revert instead, which adds a new commit that reverses it without rewriting history.
Read the lessonWhat does the staging area do in Git?
The staging area (also called the index) is where you assemble exactly which changes go into your next commit. You edit files in your working directory, run git add to stage the specific changes you want, then git commit to snapshot them — this two-step flow lets you craft focused, meaningful commits instead of dumping every change at once.
Read the lesson