Learn Git by doing.
Type real Git commands, watch what each one changes, and learn how to recover when things go wrong. Short guided lessons first, then challenges without the hand-holding.
- Open source
- Runs safely in your browser
- No account needed to learn
Demo: Your first commit
~/project $
Working tree
Staging area
Nothing staged
Repository
No .git yet
A folder with one file, README.md. It isn't a Git repository yet.
01How it works
Every command changes the repository. GitDojo shows you how.
Short, hands-on lessons that run entirely in your browser. Read the idea, type the command, watch the repository respond, then use it without help.
01 learn
One idea at a time
Each lesson explains a single concept in a few minutes, with the commands that go with it.
02 type
Run real commands
You get a repository and objectives. They tick off when the repository reaches the right state, however you get there.
03 visualize
See what changed
Files move between the working tree, staging area and history, and the commit graph redraws after every command.
04 fix
Break it, then recover
Challenges and Practice tasks set a goal with no step-by-step instructions, so you work it out.
Your dashboard shows where to continue. No account needed; sign in to sync across devices.
02What you can learn
From first commit to recovering lost work
7 courses and 48 lessons, in order, from what Git is to working with a remote.
- 01Git Basics10 lessonsLearn how Git repositories, staging, commits, and history work.
- 02Branching6 lessonsWork on features in isolation: create branches, move between them with git switch, and understand what HEAD points to.
- 03Merging5 lessonsBring finished work back together: fast-forward merges, three-way merges and merge commits, and the everyday feature-branch workflow.
- 04Merge Conflicts5 lessonsLearn why conflicts happen, how to read conflict markers, and how to resolve them by hand, one file or several at a time.
- 05Undo and Recover11 lessonsSee exactly what changed, undo it at every level, shelve unfinished work, copy commits between branches, find "lost" commits, replay a branch onto a new base and tidy its history with an interactive rebase.
- 06Everyday Git5 lessonsThe housekeeping commands you reach for every week: keeping generated files and secrets out of the repository, renaming files, reading what a commit changed, fixing the commit you just made, and tagging releases.
- 07Remotes and Collaboration6 lessonsWork with other people: how local branches relate to origin/main, fetching without changing anything, pulling changes in, pushing a branch, and reading a rejected push, then doing it all hands-on against a simulated origin.
03See inside Git
Git makes more sense when you can see it.
GitDojo makes the invisible parts of Git visible.
- Working tree
- Staging area
- Commits
- Branches
- HEAD
HEADmainMerge branch 'feature'
A real Git engine in a terminal
Commands run against an actual repository in your browser, with Git's own output. There is no server shell and nothing to install.
The graph redraws as you go
Branches, merges, rebases and HEAD update after every command, so you see what Git did rather than guess.
A code editor beside it
Edit files, resolve merge conflicts by hand, and watch Git notice the changes.
Hints when you're stuck
Hints start with the idea and only reach the exact command if you ask for it.
“Why did this happen?”
When a command fails, GitDojo explains the error in plain words, using your own files and branches.
04Real Git challenges
Break things safely.
- Merge the wrong branch.
- Lose a commit.
- Enter detached HEAD.
- Create a conflict.
Then learn how to recover.
Every lesson and challenge can start over, and nothing touches a real project.
Remotes are simulated in your browser too: fetch, pull and push work against a practice “origin”, and nothing reaches the network.
- Empty Repository
- Simple Repository
- Two Branches
- Merge Conflict
- Detached HEAD
- Recovery Practice
05 Certification track
Earn the Git Foundations completion certificate
Complete 10 lessons and 1 Practice task with a free account, and GitDojo issues a certificate with a PDF, a signed Open Badge and a public verification page.
- Checkable by anyone. Its verification page shows, without an account, whether it is valid or revoked right now.
- A completion certificate. It records that you completed the course work in GitDojo; it is not a graded exam or an industry certification. Criteria version 2.
- Want your Git history graded? The separate Git capstone is checked on the server.
Built in the open.
GitDojo is MIT licensed. Contribute lessons, challenges, features, docs and fixes: lessons are plain YAML files.
Your first commit is a few minutes away.
No install and no account needed. Your progress is saved in this browser; sign in when you want it on every device.
