Git

Learn Git. One commit at a time.

Learn Git by doing — pick a guided tutorial or explore freely.

Your First Commit5 steps
Create a file, stage it, and make your first commit
Beginner
Branching Out6 steps
Create branches, switch between them, and understand divergent history
Beginner
Tagging5 steps
Create, list, and delete tags to mark important commits
Beginner
Git Tricks4 steps
Learn useful Git tricks: .gitignore, untracking committed files with git rm --cached
Beginner
Git Stash6 steps
Save uncommitted work with git stash and restore it later
Beginner
Git Diff5 steps
Review changes before staging and committing with git diff
Beginner
Git Clean6 steps
Remove untracked files and build artifacts from your working directory
Beginner
Merge Time5 steps
Merge branches together with fast-forward and 3-way merges
Intermediate
Conflict Resolution3 steps
Learn to resolve merge conflicts step by step
Intermediate
Oops! Undoing Changes5 steps
Fix mistakes with reset and revert
Intermediate
Fetch & Pull4 steps
Fetch changes from a simulated remote and pull them into your branch
Intermediate
Git Reflog6 steps
Recover lost commits using git reflog — Git's safety net
Intermediate
Git Bisect7 steps
Find the commit that introduced a bug using binary search
Intermediate
Amend & Fixup5 steps
Fix up commits with --amend and --fixup, then clean up with interactive rebase
Intermediate
Detached HEAD4 steps
Understand detached HEAD state, how you get there, and how to recover
Intermediate
Git Blame & Log --follow5 steps
Trace who changed what with git blame and follow file history
Intermediate
Cherry Pick3 steps
Selectively apply commits from one branch to another
Advanced
Rebase Academy4 steps
Rebase branches to create a linear commit history
Advanced
Pull --rebase3 steps
Use git pull --rebase to keep a linear history when pulling remote changes
Advanced
Interactive Rebase3 steps
Use git rebase -i to rewrite commit history interactively
Advanced
Free Mode
Start with an empty repo and experiment on your own.
Type help for commands