← Git in 3D Git lab

Hands-on · 14 missions · runs in your browser

The git lab

A real terminal on a simulated repository. Type git commands, watch the commit graph move in 3D, and see every file's version in the working tree, the index and HEAD. Each mission checks your work, then shows the same thing on a real machine. Break anything you like: "reset mission" puts it back.

missions0 / 14
terminal
commit graphdrag to orbit · scroll to zoom
The 3D graph needs WebGL and cdn.jsdelivr.net. Everything else still works: try git log --oneline --all.
■ cube = commit→ arrow = parentdashed = unreachabledashed chip = origin/*
files: working tree · index · HEADclick a file to edit it

How faithful is this?

Real
Object ids are SHA-1 computed exactly as git does (a blob id here equals git hash-object on the same bytes). Commits have real parents and a real text format, so rebase, amend and cherry-pick produce new ids for the same reasons git does. Merges are three-way and line-based, with git's conflict markers and the rebase ours/theirs swap. Reflog lines, ORIG_HEAD, detached-HEAD warnings, the "fetch first" rejection and the divergent-pull error are modelled on git 2.4x.
Simplified
One folder, no subdirectories. No editor: use -m, and the todo list opens as a panel. The line matcher is a plain longest-common-subsequence, not git's Myers/histogram diff, so an unusual hunk can split differently. Dates come from a fake clock. No packfiles, hooks, gc or config files; origin lives in the same page.
Not here
git bisect, blame, submodules, worktrees, LFS, signing, add -p. All worth learning once the model is solid.

Then do it for real

Recreate mission 6 (the conflict) in a real terminal, in a throwaway folder:

mkdir git-play && cd git-play && git init -b main
printf '# Demo\nGreeting: hello\n' > README.md && git add . && git commit -m "Start"
git switch -c feature
sed -i.bak 's/hello/hi there/' README.md && git commit -am "Friendlier greeting"
git switch main
sed -i.bak 's/hello/hey/' README.md && git commit -am "Shorter greeting"
git merge feature            # CONFLICT: open README.md, fix it, then:
git add README.md && git commit --no-edit
git log --oneline --graph --all
Git labLast updated 17 October 2026