Git Learning Path
A free, ordered Git path: commits, history, branches, merge conflicts, remotes and pull requests, then fixing mistakes, with simulators and quizzes.
What you will be able to do
- Explain how commits, branches and the staging area fit together
- Read history and find the commit that changed a line
- Merge and rebase, and resolve conflicts without panic
- Work with remotes and pull requests in a team
- Undo mistakes safely, before and after you push
9 guide chapters, 9 articles, 3 interview questions, 2 simulators, 1 exercise, 1 quiz, 1 flashcard deck. Every step is free. Tick a step when you finish it, or let the guide, exercise and checklist pages tick it for you.
// stage 014 steps · 48 min
How Git works
The model behind every Git command, and your first repository.
Guide chapter14 min
Git Fundamentals: How Git Works and First Setup
How Git stores snapshots, and the setup you do once.
Guide chapter14 min
Create a Git Repository: git init, .gitignore, clone
Create a repository, write a .gitignore and clone one.
Simulator15 min
Git Concepts Simulator
Watch the working tree, staging area and commits move as you type.
// stage 025 steps · 1 h 19 min
Commits and history
Record changes with intent, and find out who changed what and why.
Guide chapter19 min
Git Add, Commit and Diff: Track and Undo Changes
git add, commit and diff, and how to undo each one.
Article12 min
Remove a File from Git Without Deleting It, or Undo git add
Stop tracking a file without deleting it, or take back a git add.
Guide chapter29 min
Git History: Log, Blame, Bisect, Revert and Reflog
log, blame, bisect, revert and reflog.
Article10 min
How to Find and Restore a Deleted File in Git
Find the commit that deleted a file and bring it back.
// stage 035 steps · 1 h 10 min
Branches and merging
Work on many things at once and bring them back together.
Guide chapter13 min
Git Branches: Create, Switch, Stash and Delete
Create, switch, stash and delete branches.
Guide chapter18 min
Git Merge and Rebase: Resolve Merge Conflicts
Merge and rebase, and resolve merge conflicts.
Simulator20 min
Git Merge Conflict Simulator
Resolve real conflict markers step by step in the browser.
Article14 min
Undo or Abort a Git Merge, and Resolve Merge Conflicts
Abort or undo a merge that went wrong.
// stage 045 steps · 1 h 54 min
Remotes and teamwork
Share work through a remote and review it in pull requests.
Guide chapter27 min
Git Remotes: Push, Fetch, Pull and Tracking Branches
push, fetch, pull and tracking branches.
Article13 min
How to Push a New Local Branch to Remote Git Repository and Track It
Push a new branch and set it to track the remote.
Guide chapter19 min
Git Workflows: Pull Requests, GitHub Flow, Gitflow
Pull requests, GitHub Flow and Gitflow.
Exercise50 min
Git Workflow and Collaboration Fundamentals
Practice a full team workflow with branches and pull requests.
// stage 057 steps · 1 h 33 min
Fixing mistakes and good habits
Undo what went wrong, keep history clean and avoid the traps.
Article13 min
Delete a Commit from a Git Branch: Reset, Rebase or Revert
Remove a commit with reset, rebase or revert, and know which is safe after a push.
Article6 min
How to Undo a Git Rebase with ORIG_HEAD or reflog
Recover from a rebase with ORIG_HEAD or the reflog.
Article12 min
How to Squash the Last N Commits and Change Commit Authors in Git
Squash commits before you open a pull request.
Guide chapter18 min
Git Best Practices: Commits, Hooks and Signing
Commit messages, hooks and signed commits.
Article14 min
A Poisoned .git/config Runs Code on git status. We Tested Which Commands and Copies Carry It
Why a cloned repository's config can run code, and how to stay safe.