Learn Git, from first commit to expert
A free Git tutorial covering commands, workflows and a full cheat sheet — from your very first commit to expert history surgery. Pick your starting point below, or practice in the built-in terminal simulator.
The four areas you need to know:
Your Files
editing right now
not tracked yet
not tracked yet
git add
→
Staging Area
queued for
next commit
next commit
git commit
→
Your Local Copy
full history
on your machine
on your machine
git push
→
Remote
shared with
the team
the team
🗺️ Learning path
01
Getting Started
Install Git, learn the terminal, and verify your setup.
02
Setup & Config
Identity, GitHub/GitLab access, SSH keys, and aliases.
03
Repos & Remotes
Clone, create, and connect repos; remote-tracking and syncing.
04
Daily Workflow
Status, add, commit, push, reading history, and stashing.
05
Branching & Merging
Branches, detached HEAD, merge/pull requests, and conflicts.
06
Rewriting History
Interactive rebase, undoing commits, cherry-pick, safe force push.
07
Advanced Git
Bisect, worktrees, hooks, submodules, Git LFS, and internals.
08
Cheat Sheet
Quick-reference table of every command, terminal navigation included.
🧭 Explore more
⌨️
Practice
29 hands-on scenarios in a browser-based terminal simulator.
📂
Examples
Real-world workflow walkthroughs — setup, teamwork, conflicts, undo.
🔀
Comparisons
Side-by-side command comparisons: merge vs rebase, fetch vs pull.
⟳
Data Flow
Interactive diagram of how commands move code between zones.
🦊
GitLab Platform
Issues, merge requests, CI/CD pipelines, tags, branch protection.
⚙️
CI/CD & Deploy
Pipelines, runners, environments, rollbacks, secrets, packaging.
🚀
Deploy
GitHub Pages, GitLab Pages, Azure Static Web Apps, and IIS.
🛠️
Mistakes & Fixes
12 common Git mistakes and the exact commands to fix them.
📄
.gitignore Ref
Copy-paste patterns for .NET, Node, Python, Java, and OS files.