// Git Academy
Learn Git before Git teaches you
Short, practical guides with a sense of humour. More lessons are on the way.
Beginner
4 min read
What is Git, actually?
Before typing commands: what Git does, and why GitHub is not Git.
5 min read
Install Git
Windows, macOS or Linux: install Git, check it works, tell it who you are.
5 min read
Your first repository and first commit
From an empty folder to a project with a clean history.
5 min read
Put your project on GitHub
Connect a local repository to GitHub, push it, and clone it elsewhere.
4 min read
The three areas of Git
Working directory, index, repository. Understand this and half your disasters disappear.
4 min read
Branches without fear
A branch is just a sticky note on a commit. Once you get that, you'll create them all the time.
6 min read
restore, reset, revert: which one?
Three commands that “undo”, three very different results. The cheat sheet you'll come back to.
4 min read
Write commits your team will thank you for
“fix”, “wip”, “final final v2”… Let's do better, in five minutes.
5 min read
fetch, pull, push: talking to the remote
Your repository and GitHub's are two different copies. Here is how they stay in sync.
6 min read
My first pull request, step by step
From an idea to a merged change: branch, push, open the PR, describe it, get it merged.
Intermediate
3 min read
Never use --force again
Why --force-with-lease exists and why it should be your only way to force push.
5 min read
The reflog, your safety net
Almost nothing committed is ever really lost. Here is how to find it.
6 min read
Merge or rebase?
The eternal debate, settled with one simple rule.
3 min read
Stash like a pro
Put work aside in two seconds without making a fake commit.
5 min read
.gitignore, for real
Patterns, exceptions, global ignore file, and why your file is still tracked.
4 min read
Tags and releases
Mark versions, push them, and never move a published tag.
6 min read
Search the history like a detective
Who changed this, when, why — and what did this file look like last month?
7 min read
Interactive rebase without fear
Reorder, merge, rename or drop commits before sharing them.
4 min read
Cherry-pick: take just one commit
Bring a fix from another branch without merging the whole branch.
6 min read
Forks and pull requests
The workflow to contribute to a project, yours or someone else's.
4 min read
Line endings: LF, CRLF and .gitattributes
Why a file shows as fully changed when you didn't touch it.
6 min read
Resolve conflicts like a pro
Read the markers, choose, test, and avoid the same conflict twice.
6 min read
Reviewing a pull request well
Test it locally, comment usefully, approve or request changes — and receive a review without suffering.
5 min read
Merge, squash or rebase: merging a pull request
The three buttons of GitHub, what they do to history, and which one to choose.
Advanced
5 min read
git bisect: find the guilty commit
A bug appeared “at some point” in 300 commits? Bisect finds it in about 8 tests.
4 min read
Worktrees: several branches checked out at once
An urgent hotfix while you're in the middle of a feature? No stash, no mess.
6 min read
Submodules without tears
Include another repository at a fixed version — and the commands everyone forgets.
5 min read
Git hooks: automate your checks
Run the linter before each commit, check the message format, block pushes to main.
4 min read
Big files with Git LFS
Videos, designs, datasets: version them without bloating the repository.
5 min read
Sign your commits
Prove the commits come from you, and get the “Verified” badge.
6 min read
Branching strategies
Trunk-based, GitHub Flow, Git Flow: which one for your team?
7 min read
How Git works inside
Blobs, trees, commits and refs: once you see them, nothing in Git is magic anymore.
More lessons coming soon. Want a topic covered? Tell us on Discord.