Learn Git & GitHub
7 lessons · ~60 minutes of reading
Git is usually taught as a list of commands, which is why so many people can commit and push but freeze the moment something goes wrong. The commands are inconsistent and badly named; the underlying model is small and completely regular.
This track teaches the model first — objects, refs, and the three trees — and then the commands make sense as operations on it. Once you can say where a commit lives and which pointer moved, recovery stops being guesswork.
It finishes with branching workflows, rewriting history safely, and the recovery techniques that make Git far less dangerous than its reputation.
Assumes: You can use a terminal. No prior version control experience is assumed, though the later lessons assume the earlier ones.
The lessons
- 1
The object model: what Git actually stores
Blobs, trees, commits and refs — the four things that explain every Git behaviour.
9 minPractise: Easy - 2
The three trees: working directory, index, HEAD
Understand where a change lives at any moment, and every add, reset and checkout becomes obvious.
8 minPractise: Easy - 3
Branching, merging and resolving conflicts
Why branching is cheap, what a merge commit really is, and how to resolve conflicts without guessing.
9 minPractise: Medium - 4
Remotes: fetch, pull, push and tracking
What a remote-tracking branch is, why pull is two commands, and how to push safely.
8 minPractise: Medium - 5
Rewriting history: amend, rebase and interactive rebase
Clean up your commits before sharing them, and know exactly where the line is.
9 minPractise: Medium - 6
Recovery and investigation
The reflog, bisect, blame and stash — how to find what broke and get back what you lost.
9 minPractise: Hard - 7
Collaborating: workflows, pull requests and GitHub
Branching strategies, review practice, and the GitHub features that carry real weight.
8 minPractise: Medium
What the practice bank covers
The lessons above are written against this syllabus, so anything in the question bank has been taught before you meet it.
- Object model: blobs, trees, commits, tags, SHA-1/SHA-256
- The three trees: working directory, index, HEAD
- Branching, fast-forward vs three-way merge
- Rebase, interactive rebase, squash, fixup, autosquash
- Conflict resolution and merge strategies
- Remotes: fetch vs pull, tracking branches, push refspecs
- Recovery: reflog, reset modes, restore, revert, cherry-pick
- Stash, worktrees, submodules, sparse checkout
- Bisect, blame, log filtering
- GitHub: PRs, reviews, protected branches, CODEOWNERS
- GitHub Actions: triggers, jobs, matrix, secrets, caching