Skip to the levels
ROOTSPIRE
DiscsFor teachers
▶ Play freeLibrary 16 discsDiscsFor teachersLog in

Every level, in the open

Git

23 worlds · 250 levels · 21 bosses

SOLUTION HIDDENTeachers see answer keys in the classroom.

▶ Play this discAll discs
All discsLinux: Zero to RootBash ScriptingGitDatabasesPython for OpsLinux Sysadmin ProNetworkingObservabilityCloud & IaCDocker & ContainersCTF ArenaSOC FieldWindows for Linux peopleKubernetesAnsibleThe Guildhall: First Week

Thirteen worlds of real git, from your first commit to shipping through pull requests. Branch, merge, fight conflicts, rewind time, craft clean commits, push to remotes, review teammates and keep CI green on a real machine.

Guided levels show the command first. Alone levels give the goal only. Bosses and exams are timed.

Jump to a world

World 1 The Time VaultWorld 2 The LensWorld 3 The Branching WoodsWorld 4 The ClashWorld 5 The RewindWorld 6 The WeaveWorld 7 The HarborWorld 8 The ScribeWorld 9 The BinderyWorld 10 The LighthouseWorld 11 The BeaconWorld 12 The GuildWorld 13 The CouncilWorld 14 The Forge LineWorld 15 The FoundryWorld 16 The CommonsWorld 17 Keys & TrustWorld 18 SealsWorld 19 Under the HoodWorld 20 The Salvage YardWorld 21 The GiantsWorld 22 The FederationFinal exam The Keeper's Exam

World 1The Time Vault

9 levels

Save points for your files: config, init, status, add, commit, log and .gitignore.

  1. 1

    Level 1: Who are you?

    GuidedEasy

    Objective: Tell git who you are: set your user.name and user.email with git config --global.

    Git signs every save point with a name and an email. git config --global stores them once, for every repository you will ever make.

    Commands taughtgit-config

    ▶ Play: Who are you?SOLUTION HIDDEN10 XP
  2. 2

    Level 2: The first vault

    GuidedEasy

    Objective: Turn ~/saga, where Kern writes his saga, into a git repository.

    hidden turns a plain folder into a repository. It creates a hidden .git folder where every save point will live.

    Commands taughtgit-init

    ▶ Play: The first vaultSOLUTION HIDDEN10 XP
  3. 3

    Level 3: The stage

    GuidedEasy

    Objective: Put chapter1.md and chapter2.md on the stage, but leave scratch.txt off it.

    hidden tells you which files are new, changed or ready. git add puts files on the stage (also called the index): the waiting area for the next save point, and only what is on it gets saved.

    Commands taughtgit-statusgit-add

    ▶ Play: The stageSOLUTION HIDDEN15 XP
  4. 4

    Level 4: First save point

    GuidedEasy

    Objective: Save the staged chapters as the saga's first commit, with a message.

    hidden saves everything on the stage as a snapshot, forever. -m gives the message that says what changed.

    Commands taughtgit-commit

    ▶ Play: First save pointSOLUTION HIDDEN15 XP
  5. 5

    Level 5: The long message

    GuidedEasy

    Objective: Commit the staged chapter3.md WITHOUT -m: subject 'Add chapter 3', an empty line, one sentence about the chapter; then save and quit nano.

    Without -m, hidden opens your editor (nano here): line 1 = subject, then an empty line, then the body (why). Ctrl-O Enter saves, Ctrl-X quits; in vim it is Esc then :wq Enter; pick yours with hidden.

    Commands taughtgit-editor

    ▶ Play: The long messageSOLUTION HIDDEN15 XP
  6. 6

    Level 6: Two save points

    AloneMedium

    Objective: Commit the new chapter3.md, then fix the typo 'dargon' in chapter1.md and commit that separately.

    Good history has one commit per change, and git log lists them newest first. A file you change after a commit must be git add-ed again before the next one (hidden -am does that for files git already knows).

    Commands taughtgit-log

    ▶ Play: Two save pointsSOLUTION HIDDEN20 XP
  7. 7

    Level 7: Ignore the junk

    AloneMedium

    Objective: Make git ignore every *.log file and the build/ folder in ~/saga, and commit your .gitignore.

    A .gitignore file lists patterns git should never track: build output, logs, secrets. Commit it so every copy of the repo ignores the same things.

    Commands taughtgitignore

    ▶ Play: Ignore the junkSOLUTION HIDDEN25 XP
  8. 8

    Level 8: Who deleted the ending?

    Alone⏱ TimedHard

    Objective: Someone made a commit called 'Delete the ending': tell Kern who it was (kern <name>).

    git log shows the author, date and message of every commit. The vault never forgets who did what.

    ▶ Play: Who deleted the ending?SOLUTION HIDDEN30 XP
  9. 9

    Level 9: Boss: the chronicle

    Boss⏱ TimedHard

    Objective: Make ~/chronicle a repo where Archivist (set for this repo only) commits ch1, ch2, ch3 one per commit in order, with *.tmp ignored by a committed .gitignore.

    Settings without --global belong to one repository only. Everything else you already know.

    ▶ Play: Boss: the chronicleSOLUTION HIDDEN60 XP

World 2The Lens

12 levels

See through time: diff, diff --staged, show, restore, log searches and blame.

  1. 10

    Level 10: Spot the difference

    GuidedEasy

    Objective: Someone changed one line of settings.conf: tell Kern its OLD value (kern <value>).

    hidden shows what changed since the last commit, line by line. A line starting with - was removed, + was added.

    Commands taughtgit-diff

    ▶ Play: Spot the differenceSOLUTION HIDDEN15 XP
  2. 11

    Level 11: On stage, off stage

    GuidedEasy

    Objective: potions.txt has a staged change and an unstaged one: tell Kern which potion the STAGED change adds.

    hidden only shows changes that are NOT staged yet. hidden shows what's already on the stage, ready for the next commit.

    Commands taughtgit-diff-staged

    ▶ Play: On stage, off stageSOLUTION HIDDEN15 XP
  3. 12

    Level 12: The old password

    GuidedEasy

    Objective: The commit 'Add vault door' put a password in door.txt, removed since: tell Kern that password.

    git show <commit> prints one commit: its message and everything it changed. Name a commit by its short hash, or count back from HEAD, git's 'you are here' marker (your latest commit): HEAD~1 is the one before it, HEAD~2 two before.

    Commands taughtgit-show

    ▶ Play: The old passwordSOLUTION HIDDEN15 XP
  4. 13

    Level 13: The long scroll

    GuidedEasy

    Objective: Open git log (45 commits), search for 'lighthouse', and tell Kern the first 7 characters of that commit's hash (kern <hash>).

    Long output (git log, diff, show) opens in the pager less, like on any real machine; short output just prints. Space = next page, b = back, /word Enter = search, n = next match, q = quit (from now on the Lens always pages).

    Commands taughtgit-pager

    ▶ Play: The long scrollSOLUTION HIDDEN15 XP
  5. 14

    Level 14: Names for commits

    GuidedEasy

    Objective: Try each name for a commit in ~/lens: HEAD, HEAD~1, HEAD^, then a range with ..

    Name a commit without its hash: HEAD is the commit you are on, HEAD~1 one back, HEAD~2 two back, and HEAD^ its parent (here the same as HEAD~1). A..B means the commits in B that are not in A.

    Commands taughtgit-revspecs

    ▶ Play: Names for commitsSOLUTION HIDDEN15 XP
  6. 15

    Level 15: Cat on the keyboard

    GuidedEasy

    Objective: Restore spells.txt to its last committed version, but keep Kern's new line in notes.txt.

    git restore <file> throws away the uncommitted edits in that file and brings back the committed version. There is no undo for the undo.

    Commands taughtgit-restore

    ▶ Play: Cat on the keyboardSOLUTION HIDDEN15 XP
  7. 16

    Level 16: Four more lenses

    GuidedEasy

    Objective: Try each lens once in ~/lens.

    A few more lenses before you work alone: hidden (the same as --staged), git restore --staged (take a file off the stage), git log --grep (search commit messages), git log -S (search what commits changed) and git blame (who wrote each line).

    Commands taughtgit-restore-stagedgit-log-searchgit-blame

    ▶ Play: Four more lensesSOLUTION HIDDEN15 XP
  8. 17

    Level 17: Not the secrets!

    AloneMedium

    Objective: Take secrets.env off the stage without deleting it, and keep readme.md staged.

    git restore --staged <file> takes a file off the stage. The file and your edits stay on disk.

    ▶ Play: Not the secrets!SOLUTION HIDDEN20 XP
  9. 18

    Level 18: Needle in the log

    AloneMedium

    Objective: Among 40 commits, one message mentions the cauldron: tell Kern its hash (7 characters is enough).

    git log can search: --grep=word finds commit messages, --author=name finds people. Add --oneline to read fast.

    ▶ Play: Needle in the logSOLUTION HIDDEN25 XP
  10. 19

    Level 19: Fireball = ice?!

    Alone⏱ TimedHard

    Objective: Someone set 'fireball = ice' in spells.txt: tell Kern who.

    git blame <file> shows, for every line, the commit and author that last changed it.

    ▶ Play: Fireball = ice?!SOLUTION HIDDEN30 XP
  11. 20

    Level 20: Cold case

    Alone⏱ TimedHard

    Objective: Find the commit that added the comment 'HACK' and tell Kern the backdoor password it also put in door.txt.

    git log -S word finds the commits that added or removed that word in any file. Pair it with git show to see the whole crime.

    ▶ Play: Cold caseSOLUTION HIDDEN40 XP
  12. 21

    Level 21: Boss: the saboteur

    Boss⏱ TimedHard

    Objective: First tell Kern which spell the STAGED change removes from spells.txt, then undo every uncommitted change (backdoor.sh off the stage).

    A saboteur left uncommitted changes, some staged, some not. Read the evidence before you destroy it.

    ▶ Play: Boss: the saboteurSOLUTION HIDDEN60 XP

World 3The Branching Woods

10 levels

Many paths at once: branch, switch, fast-forward and three-way merges, pruning, and reading the map.

  1. 22

    Level 22: A new path

    GuidedEasy

    Objective: Create a branch called lantern (you can stay on main).

    A branch is just a movable name pointing at a commit. hidden <name> creates one right here; hidden lists them all.

    Commands taughtgit-branch

    ▶ Play: A new pathSOLUTION HIDDEN10 XP
  2. 23

    Level 23: Walk the torch path

    GuidedEasy

    Objective: On a new branch named torch, commit a new file torch.txt; main must not change.

    git switch <branch> moves you onto a branch (HEAD, the 'you are here' marker, now points at it), and every new commit moves that branch forward. git switch -c <name> creates it and switches in one go.

    Commands taughtgit-switch

    ▶ Play: Walk the torch pathSOLUTION HIDDEN15 XP
  3. 24

    Level 24: The old spell

    GuidedEasy

    Objective: Using only git checkout: create and enter a branch 'lantern', go back to main, then throw away the scribble in map.txt.

    Before switch and restore existed, git checkout did both jobs, and most tutorials and older teammates still use it: git checkout -b NAME = switch -c, git checkout NAME = switch, git checkout -- FILE = restore FILE.

    Commands taughtgit-checkout

    ▶ Play: The old spellSOLUTION HIDDEN15 XP
  4. 25

    Level 25: Cross the bridge

    GuidedEasy

    Objective: Bring the bridge branch's three commits into main.

    git merge <branch> brings another branch's commits into the branch you're on. If yours hasn't moved since, git just slides it forward: a fast-forward.

    Commands taughtgit-merge

    ▶ Play: Cross the bridgeSOLUTION HIDDEN15 XP
  5. 26

    Level 26: Tools for the trail

    GuidedEasy

    Objective: In ~/woods/trail, try each tool once.

    Three branch tools before you work alone: git merge --no-edit (merge and keep git's message, no editor), hidden (branches already inside yours) and hidden -d / -D (delete a branch name: -d only when it is merged, -D even when it is not).

    Commands taughtgit-branch-delete

    ▶ Play: Tools for the trailSOLUTION HIDDEN15 XP
  6. 27

    Level 27: Two roads meet

    AloneMedium

    Objective: Merge the camp branch into main, where both have moved on.

    When both branches have new commits, git merge makes a merge commit with two parents. --no-edit keeps git's default message instead of opening the editor.

    ▶ Play: Two roads meetSOLUTION HIDDEN20 XP
  7. 28

    Level 28: Prune the dead paths

    AloneMedium

    Objective: Delete every branch already merged into main, and keep the unmerged ones.

    hidden lists branches whose work is already in yours. hidden -d deletes a merged branch, and refuses an unmerged one.

    ▶ Play: Prune the dead pathsSOLUTION HIDDEN25 XP
  8. 29

    Level 29: Read the map

    AloneMedium

    Objective: Draw the graph of all branches and tell Kern which trail holds 'Find the hidden spring' (kern <branch>).

    hidden draws every branch: * is a commit, | is a line of history, / and \ are where lines split or join. The (name) next to a commit is the branch that points there.

    Commands taughtgit-log-graph

    ▶ Play: Read the mapSOLUTION HIDDEN20 XP
  9. 30

    Level 30: Where is the key?

    Alone⏱ TimedHard

    Objective: One of six paths has the commit 'Found the key': tell Kern which branch (kern <branch>).

    hidden --contains <commit> lists the branches that have that commit. hidden draws the whole map.

    ▶ Play: Where is the key?SOLUTION HIDDEN30 XP
  10. 31

    Level 31: Boss: the crossroads

    Boss⏱ TimedHard

    Objective: Merge scout-north and then scout-east into main, delete those two, keep scout-west, and commit camp.txt on a new branch camp off the result.

    Three scouts are back. Use everything the woods taught you.

    ▶ Play: Boss: the crossroadsSOLUTION HIDDEN60 XP

World 4The Clash

6 levels

When two branches change the same lines: conflict markers, resolving, aborting, ours and theirs.

  1. 32

    Level 32: Two choruses

    GuidedEasy

    Objective: Merge ballad into main and keep BOTH chorus lines in song.txt, without the markers.

    When two branches change the same lines, git merge stops and writes both versions into the file between <<<<<<<, ======= and >>>>>>> markers. You edit the file, then git add and hidden to finish.

    Commands taughtgit-conflicts

    ▶ Play: Two chorusesSOLUTION HIDDEN20 XP
  2. 33

    Level 33: Pull the brake

    GuidedEasy

    Objective: Someone started merging chaos into main and hit conflicts: abort it and leave main as it was.

    A conflicted merge is a state you can leave: hidden cancels it and puts everything back as it was before.

    Commands taughtgit-merge-abort

    ▶ Play: Pull the brakeSOLUTION HIDDEN15 XP
  3. 34

    Level 34: Ours or theirs

    GuidedEasy

    Objective: In ~/clash/garage, a merge stopped on two files: keep ours for readme.md, take theirs for engine.ini, then finish the merge.

    In a conflict you can take one side of a file whole, no editing. git checkout --ours <file> keeps your branch's version (the one you are on), git checkout --theirs <file> takes the incoming branch's version. Then git add and commit, as always.

    Commands taughtgit-ours-theirs

    ▶ Play: Ours or theirsSOLUTION HIDDEN15 XP
  4. 35

    Level 35: Ours or theirs

    AloneMedium

    Objective: Merge tuning into main, keeping THEIR config.ini and OUR readme.md.

    During a conflict, git checkout --ours <file> keeps your branch's version whole, and --theirs keeps the other branch's. Then git add it as usual.

    ▶ Play: Ours or theirsSOLUTION HIDDEN25 XP
  5. 36

    Level 36: Lamps in a hurry

    Alone⏱ TimedHard

    Objective: Merge lamps into main: lamps.txt keeps every lamp from both sides, colors.ini is theirs, readme.md is ours.

    Real merges mix it all: some files need both sides, some need one. hidden lists every file still in conflict.

    ▶ Play: Lamps in a hurrySOLUTION HIDDEN40 XP
  6. 37

    Level 37: Boss: the three-way clash

    Boss⏱ TimedHard

    Objective: Abort the goblin's half-done merge, then merge feat-red, feat-green and feat-blue so the palette line lists red, green and blue.

    Three branches, one line. Clean up first, then merge them one by one.

    ▶ Play: Boss: the three-way clashSOLUTION HIDDEN70 XP

World 5The Rewind

11 levels

Turn back time safely: stash, amend, reset --soft and --hard, revert, and the reflog that remembers everything.

  1. 38

    Level 38: The shelf

    GuidedEasy

    Objective: Shelve the unfinished step 3 in recipe.txt, fix the typo 'poshun' and commit it, then bring step 3 back.

    hidden puts your uncommitted changes on a shelf and cleans the folder. hidden brings them back.

    Commands taughtgit-stash

    ▶ Play: The shelfSOLUTION HIDDEN15 XP
  2. 39

    Level 39: Oops, that commit

    GuidedEasy

    Objective: Fix the last commit 'Add spel': its message must be 'Add spell' and it must include spell.txt.

    hidden --amend replaces the last commit: a fixed message, plus anything you staged since. Use it only on commits nobody else has yet.

    Commands taughtgit-commit-amend

    ▶ Play: Oops, that commitSOLUTION HIDDEN15 XP
  3. 40

    Level 40: Soft and hard

    GuidedEasy

    Objective: In ~/rewind, undo the last commit softly, then throw the leftovers away with --hard.

    git reset moves your branch back to an older commit. --soft keeps the undone changes staged, ready to commit again. --hard throws away every uncommitted change in your files: there is no undo for that part.

    Commands taughtgit-reset

    ▶ Play: Soft and hardSOLUTION HIDDEN15 XP
  4. 41

    Level 41: Too early

    AloneMedium

    Objective: Undo the last commit 'Add towers (not ready!)' but keep its changes in your files.

    hidden removes the last commit but keeps its changes, staged. The work stays, only the save point goes.

    ▶ Play: Too earlySOLUTION HIDDEN20 XP
  5. 42

    Level 42: Two jobs, one commit

    GuidedEasy

    Objective: Undo the two-job commit 'Gate and moat, all at once' with a plain (mixed) reset, then commit gate.txt and moat.txt separately.

    hidden (no flag = --mixed, the default) removes the last commit and UNstages its changes: they wait in your files, like before git add. Perfect for splitting a commit that did two jobs.

    ▶ Play: Two jobs, one commitSOLUTION HIDDEN20 XP
  6. 43

    Level 43: Back to stable

    AloneMedium

    Objective: Move the experiment branch back to its commit 'Stable potion', with the files matching.

    git reset --hard <commit> moves the branch back AND makes every file match that commit. Uncommitted work is destroyed, so look first.

    ▶ Play: Back to stableSOLUTION HIDDEN25 XP
  7. 44

    Level 44: The undo log

    GuidedEasy

    Objective: In ~/rewind, revert the last commit, read the reflog, then jump back to before the revert.

    Two safety nets. git revert <commit> adds a NEW commit that undoes an old one (safe on shared branches). hidden lists every place HEAD has been, so even a reset commit can be found again: HEAD@{1} means 'where HEAD was one move ago'.

    Commands taughtgit-revertgit-reflog

    ▶ Play: The undo logSOLUTION HIDDEN15 XP
  8. 45

    Level 45: Undo in public

    AloneMedium

    Objective: Undo the shared commit 'Turn the dragon purple' with git revert, keeping every later commit.

    When others already have your history, don't rewrite it. git revert <commit> adds a NEW commit that undoes an old one.

    ▶ Play: Undo in publicSOLUTION HIDDEN25 XP
  9. 46

    Level 46: Lost treasure

    Alone⏱ TimedHard

    Objective: A git reset --hard lost the commits 'Pirate route' and 'Treasure map': bring both back into main.

    hidden lists every place HEAD has been, even commits no branch points to anymore. HEAD@{1} means 'where HEAD was one move ago', and git reset --hard can jump back there (a hash works too).

    ▶ Play: Lost treasureSOLUTION HIDDEN40 XP
  10. 47

    Level 47: Friday cleanup

    Alone⏱ TimedHard

    Objective: Turn 'WIP 1' and 'WIP 2' into a single commit 'Add the ending', and keep your staged notes.txt edit out of it, but not lost.

    Before you share commits, clean them up: reset --soft and --amend can merge commits into one. Stash keeps unrelated work out of the way.

    ▶ Play: Friday cleanupSOLUTION HIDDEN40 XP
  11. 48

    Level 48: Boss: rescue the history

    Boss⏱ TimedHard

    Objective: Bring back the deleted branch legend and the lost commit 'Chapter 9' into main, and undo the shared commit 'Wipe the archive' without rewriting it.

    Someone wrecked this repo: a deleted branch, a lost commit and a shared bad commit. The reflog remembers it all.

    ▶ Play: Boss: rescue the historySOLUTION HIDDEN70 XP

World 6The Weave

9 levels

Rewrite your own history neatly: rebase, cherry-pick, rebase conflicts, squash, and bisect to hunt a bug.

  1. 49

    Level 49: Straight thread

    GuidedEasy

    Objective: Rebase the loom branch onto the latest main.

    git rebase <base> replays your branch's commits on top of base, as if you had started there. History becomes a straight line, no merge commit.

    Commands taughtgit-rebase

    ▶ Play: Straight threadSOLUTION HIDDEN15 XP
  2. 50

    Level 50: Pick one cherry

    GuidedEasy

    Objective: Bring only the commit 'Fix the broken thread' from dev onto main.

    git cherry-pick <commit> copies one commit onto the branch you're on, without the rest of its branch.

    Commands taughtgit-cherry-pick

    ▶ Play: Pick one cherrySOLUTION HIDDEN15 XP
  3. 51

    Level 51: Knotted thread

    AloneMedium

    Objective: Rebase gold onto main and keep both the red thread and the gold thread in weave.txt.

    A rebase can stop on a conflict, just like a merge. Fix the file, git add it, then hidden (or --abort to give up).

    Commands taughtgit-rebase-continue

    ▶ Play: Knotted threadSOLUTION HIDDEN25 XP
  4. 52

    Level 52: Three into one

    AloneMedium

    Objective: Squash the last 3 commits of tapestry into one commit named 'Weave the tapestry'.

    Squashing turns several messy commits into one clean commit. hidden then one hidden does it.

    Commands taughtgit-squash

    ▶ Play: Three into oneSOLUTION HIDDEN25 XP
  5. 53

    Level 53: Off the path

    GuidedEasy

    Objective: Visit tag v1 (the blue pattern) with hidden, add a line 'gold' to cloth.txt and commit it, then save that work on a new branch 'blue-idea'.

    git switch --detach <commit> (or git checkout <hash>) puts HEAD on a commit instead of a branch: 'detached HEAD'. You can look and even commit there, but those commits belong to no branch until you run git switch -c NAME.

    Commands taughtgit-detached-head

    ▶ Play: Off the pathSOLUTION HIDDEN20 XP
  6. 54

    Level 54: Halving the search

    GuidedEasy

    Objective: In ~/weave/loom, a test broke somewhere in the last 4 commits: find the culprit with git bisect.

    git bisect finds the commit that broke something by halving the history: start, mark a bad commit and a good one, and git checks out the middle. git bisect run <test> lets a script answer good (exit 0) or bad for every step. hidden brings you back.

    Commands taughtgit-bisect

    ▶ Play: Halving the searchSOLUTION HIDDEN20 XP
  7. 55

    Level 55: Bug hunt

    AloneMedium

    Objective: ./check.sh fails on main but passed in the first commit: tell Kern the hash of the first bad commit.

    git bisect finds the commit that broke something by binary search: mark one bad and one good commit, then git tests the middle. git bisect run <script> does it all for you.

    ▶ Play: Bug huntSOLUTION HIDDEN30 XP
  8. 56

    Level 56: Sixty rows

    Alone⏱ TimedHard

    Objective: Bisect the 60 shared commits to find the one that breaks ./check.sh, then undo it on main with git revert.

    Find, then fix: a bisect points at the culprit, a revert undoes it without rewriting shared history.

    ▶ Play: Sixty rowsSOLUTION HIDDEN45 XP
  9. 57

    Level 57: Boss: the master weaver

    Boss⏱ TimedHard

    Objective: Cherry-pick 'Fix the frayed edge' onto main, make banner one commit 'Add the banner' rebased on main (keep both weave.txt changes), fast-forward main.

    Before a feature joins main, it gets the hotfixes, a clean single commit, and a straight line.

    ▶ Play: Boss: the master weaverSOLUTION HIDDEN70 XP

World 7The Harbor

11 levels

Work with others: clone, push, remotes, fetch and pull, rejected pushes, and hooks that guard the repo.

  1. 58

    Level 58: A copy of the atlas

    GuidedEasy

    Objective: Clone /srv/git/atlas.git into ~/harbor/atlas.

    git clone <url> copies a whole repository, every commit included, and remembers where it came from as a remote (a named link to another copy of the repo) called 'origin'. Here the 'server' is just a folder: /srv/git/atlas.git. hidden lists remotes with URLs.

    Commands taughtgit-clone

    ▶ Play: A copy of the atlasSOLUTION HIDDEN15 XP
  2. 59

    Level 59: Send it out

    GuidedEasy

    Objective: In ~/harbor/atlas, commit a new file port.txt and push it to origin.

    hidden sends your new commits to the remote, so others can get them. Commit first: push only sends commits.

    Commands taughtgit-push

    ▶ Play: Send it outSOLUTION HIDDEN15 XP
  3. 60

    Level 60: Publish the logbook

    AloneMedium

    Objective: Connect ~/harbor/logbook to the empty /srv/git/logbook.git as origin and push main with -u.

    git remote add <name> <url> connects an existing repo to a remote. hidden pushes and makes main track origin/main, so later a plain hidden or pull knows where to go.

    Commands taughtgit-remote

    ▶ Play: Publish the logbookSOLUTION HIDDEN25 XP
  4. 61

    Level 61: What's new upstream?

    GuidedEasy

    Objective: In ~/harbor/tides-log, set main's upstream, fetch, list what's new upstream, then pull it with --ff-only.

    A branch's upstream is the remote branch it tracks (origin/main). hidden downloads new commits, your work untouched. @{u} names the upstream, so HEAD..@{u} = commits there you don't have yet. hidden takes them only if no merge is needed.

    Commands taughtgit-fetchgit-pull

    ▶ Play: What's new upstream?SOLUTION HIDDEN15 XP
  5. 62

    Level 62: Look before you pull

    AloneMedium

    Objective: Mira pushed a warning to the atlas: tell Kern what to beware of (kern <word>), without changing your main.

    hidden downloads the remote's new commits without touching your main: they land in origin/main, your copy's snapshot of the server's main. Then git log origin/main shows what's new.

    ▶ Play: Look before you pullSOLUTION HIDDEN25 XP
  6. 63

    Level 63: Take it in

    AloneMedium

    Objective: Bring Mira's newly pushed commit into your local main.

    hidden is hidden plus merging origin/main into your branch. If you have no new commits, it's a fast-forward.

    ▶ Play: Take it inSOLUTION HIDDEN20 XP
  7. 64

    Level 64: Pick a side, once

    AloneMedium

    Objective: You and Mira both committed: set pull to rebase (globally), then pull so 'Note the full moon' sits on top of Mira's commit.

    When you AND the remote both have new commits, plain hidden stops: 'You have divergent branches'. Tell git once how to reconcile: hidden (your commits go on top of theirs: a straight line) or pull.ff only (refuse, and decide by hand).

    ▶ Play: Pick a side, onceSOLUTION HIDDEN20 XP
  8. 65

    Level 65: The harbor guard

    AloneMedium

    Objective: Write an executable .git/hooks/pre-commit in atlas that refuses any commit whose staged changes contain SECRET.

    Hooks are scripts in .git/hooks that git runs at certain moments. pre-commit runs before every commit, and a non-zero exit cancels the commit. They live on YOUR machine (hidden --no-verify skips them), so teams repeat key checks on the server.

    Commands taughtgit-hooks

    ▶ Play: The harbor guardSOLUTION HIDDEN30 XP
  9. 66

    Level 66: Rejected!

    Alone⏱ TimedHard

    Objective: Push your commit 'Place the buoys' to origin, keeping Mira's newer commit there.

    If the remote has commits you don't have, hidden is rejected. Get them first with hidden (plain hidden will ask you to choose), which puts your commit on top of theirs, then push again: never force over a teammate.

    ▶ Play: Rejected!SOLUTION HIDDEN40 XP
  10. 67

    Level 67: Force, politely

    AloneMedium

    Objective: Rebase your already-pushed branch soundings onto main, then update the remote soundings with --force-with-lease.

    After a rebase your branch's commits have new hashes, so a normal push is refused. hidden overwrites the remote branch ONLY if it is still where you last saw it; if a teammate pushed in between, it refuses. Plain --force would erase their work without asking.

    ▶ Play: Force, politelySOLUTION HIDDEN25 XP
  11. 68

    Level 68: Boss: harbor master

    Boss⏱ TimedHard

    Objective: Clone fleet.git, add the SECRET hook, push main to a new remote 'mirror' (/srv/git/fleet-mirror.git), commit sails.txt on a new branch sails, push it with -u.

    A new fleet joins the harbor. Copy it, guard it, mirror it, and send out its first branch.

    ▶ Play: Boss: harbor masterSOLUTION HIDDEN70 XP

World 8The Scribe

11 levels

Write history people can read: real editors, good messages, staging only what belongs, and tidy files.

  1. 69

    Level 69: The other editor

    GuidedEasy

    Objective: In ~/scribe/notes, make vim git's editor, abort one commit with :cq, then commit the staged notes.md for real in vim.

    vim is on every server, so sooner or later git opens it: press i to type, Esc to stop, then :wq Enter to save and quit. :cq Enter quits with an error, and git aborts the commit.

    Commands taughtvim-commit

    ▶ Play: The other editorSOLUTION HIDDEN20 XP
  2. 70

    Level 70: Fifty, then seventy-two

    GuidedEasy

    Objective: In ~/scribe/scrolls, commit the staged read.sh fix from your editor: a short imperative subject, a blank line, and a body saying why.

    A good message is a subject of 50 characters or fewer, written as an order ('Fix…', not 'Fixed…') with no period, then a blank line, then a body wrapped at 72 that says WHY. Tools like hidden and every forge show only the subject.

    Commands taughtcommit-message

    ▶ Play: Fifty, then seventy-twoSOLUTION HIDDEN20 XP
  3. 71

    Level 71: feat, fix, docs

    GuidedEasy

    Objective: In ~/scribe/spells, make three commits, one per changed file: feat for frost.sh, fix for fire.sh, docs for README.md.

    Many teams use Conventional Commits: type(optional scope): description, e.g. feat: add frost, fix(fire): correct typo, docs: list spells. Tools read the types to build changelogs and pick the next version number.

    Commands taughtconventional-commits

    ▶ Play: feat, fix, docsSOLUTION HIDDEN20 XP
  4. 72

    Level 72: Pick the hunks

    GuidedEasy

    Objective: In ~/scribe/ledger, commit only the two typo fixes in ledger.sh (guild, total), not the DEBUG line, using git add -p.

    git add -p shows your changes one hunk (block of nearby changed lines) at a time: y stages it, n skips it, q stops. One file can then become a clean commit plus leftovers.

    Commands taughtgit-add-patch

    ▶ Play: Pick the hunksSOLUTION HIDDEN20 XP
  5. 73

    Level 73: Too close together

    AloneMedium

    Objective: In ~/scribe/market, commit only the ink price fix in prices.sh, not the DEBUG line right below it.

    When two changes sit only a line apart, git add -p shows them as ONE hunk. Answer s (split) and git cuts it into smaller hunks you can take one by one.

    ▶ Play: Too close togetherSOLUTION HIDDEN25 XP
  6. 74

    Level 74: Three ways to remove

    GuidedEasy

    Objective: In ~/scribe/shelf, try git rm, git rm --cached, then the folder versions with -r and -q.

    git rm <file> deletes a file AND stages the deletion. git rm --cached <file> only stops tracking it: the file stays on your disk. -r does a whole folder, and -q (quiet) skips the line git prints for every file.

    Commands taughtgit-rm

    ▶ Play: Three ways to removeSOLUTION HIDDEN15 XP
  7. 75

    Level 75: Stop tracking it

    AloneMedium

    Objective: In ~/scribe/archive, hidden, untrack app.log but keep it on disk, ignore *.log, and commit.

    git rm FILE deletes the file and stages the deletion. git rm --cached FILE only untracks it: the file stays on disk, and a .gitignore line keeps it out from now on.

    ▶ Play: Stop tracking itSOLUTION HIDDEN25 XP
  8. 76

    Level 76: Moving and sweeping

    GuidedEasy

    Objective: In ~/scribe/study, rename a file, follow a renamed file's history, then preview and sweep the untracked mess.

    git mv old new renames a file and stages the rename. git log --follow <file> keeps following a file's history across renames. git clean deletes untracked files: -n shows what would go (a dry run), -f really deletes, -d includes folders.

    Commands taughtgit-mvgit-clean

    ▶ Play: Moving and sweepingSOLUTION HIDDEN15 XP
  9. 77

    Level 77: Same story, new name

    AloneMedium

    Objective: In ~/scribe/grimoire, rename spells.txt to grimoire.txt with git mv, commit it, then show its full history with git log --follow.

    git mv OLD NEW renames the file and stages it; git notices the rename by content. git log FILE stops at the rename, git log --follow FILE keeps going back.

    ▶ Play: Same story, new nameSOLUTION HIDDEN25 XP
  10. 78

    Level 78: Sweep the desk

    AloneMedium

    Objective: In ~/scribe/desk, preview with hidden, then delete the untracked files and folders, but keep the ignored debug.log.

    git clean deletes untracked files: -n only lists what would go (always first!), -f really deletes, -d includes folders, -x also ignored files. Deleted untracked files are not in git: no undo.

    ▶ Play: Sweep the deskSOLUTION HIDDEN25 XP
  11. 79

    Level 79: Inkpot rush

    Alone⏱ TimedHard

    Objective: In ~/scribe/inkpot, make one fix: commit with a body: ink.sh's fix (not DEBUG), cache.db untracked and ignored; then clean up tmp/.

    Everything at once, against the clock: stage only what belongs, untrack what should be ignored, write a message a reviewer can read, sweep the rest.

    ▶ Play: Inkpot rushSOLUTION HIDDEN50 XP

World 9The Bindery

10 levels

Rebind your branch before anyone reads it: reword, reorder, drop, squash and split commits, and guard every message.

  1. 80

    Level 80: A better title

    GuidedEasy

    Objective: In ~/bindery/atlas, use git rebase -i to reword the commit 'fixd stuff' to 'Fix the margin on page 2'.

    hidden opens a todo list of your last 3 commits, oldest first, one 'pick' per line. Change pick to reword (or r), save and quit, and git stops to let you rewrite that commit's message.

    Commands taughtgit-rebase-interactive

    ▶ Play: A better titleSOLUTION HIDDEN20 XP
  2. 81

    Level 81: Shuffle and cut

    AloneMedium

    Objective: In ~/bindery/book, use git rebase -i to drop 'Add debug notes' and put 'Add chapter 1' before 'Add chapter 2'.

    In the rebase -i todo list, the order of the lines IS the new order of the commits, and a deleted line (or drop) is a deleted commit. In nano: Ctrl-K cuts a line, Ctrl-U pastes it above the cursor.

    ▶ Play: Shuffle and cutSOLUTION HIDDEN25 XP
  3. 82

    Level 82: Three into one

    AloneMedium

    Objective: In ~/bindery/map, fold the two 'map:' commits into 'Add the map' with git rebase -i, keeping just the message 'Add the map'.

    squash (s) melds a commit into the one above it and lets you edit the combined message; fixup (f) melds it and keeps the message above. Typo fixes to your own unmerged work belong inside the commit they fix.

    ▶ Play: Three into oneSOLUTION HIDDEN25 XP
  4. 83

    Level 83: A fix with an address

    GuidedEasy

    Objective: In ~/bindery/porch, commit the staged fix as a fixup of 'Add login form', then fold it in.

    hidden --fixup <commit> makes a commit titled 'fixup! <that subject>'. git rebase -i --autosquash then moves it under its target, already marked fixup: you only save and quit.

    Commands taughtgit-commit-fixup

    ▶ Play: A fix with an addressSOLUTION HIDDEN15 XP
  5. 84

    Level 84: Fixups that find home

    AloneMedium

    Objective: In ~/bindery/gate, commit the login.html fix with --fixup for 'Add login form', then fold it in with git rebase -i --autosquash.

    hidden --fixup HASH records a commit titled 'fixup! <that subject>'. Later, git rebase -i --autosquash puts it right under its target, already marked fixup: you only save and quit.

    ▶ Play: Fixups that find homeSOLUTION HIDDEN30 XP
  6. 85

    Level 85: One commit, two ideas

    AloneMedium

    Objective: In ~/bindery/site, split 'Add header and footer' into two commits, header first, with git rebase -i and edit.

    edit (e) stops the rebase right after that commit. Undo it with hidden (the changes stay in your files), commit them in pieces, then hidden.

    ▶ Play: One commit, two ideasSOLUTION HIDDEN30 XP
  7. 86

    Level 86: Patches and test runs

    GuidedEasy

    Objective: In ~/bindery/press, mail a commit to yourself and apply it back, then make an empty commit and test every commit with --exec.

    Some projects take commits by email: git format-patch writes commits as .patch files, git am applies them. hidden --allow-empty commits with no change, and git rebase --exec runs a command after every replayed commit.

    ▶ Play: Patches and test runsSOLUTION HIDDEN20 XP
  8. 87

    Level 87: The gatekeeper

    AloneMedium

    Objective: In ~/bindery/gatekeeper, write an executable .git/hooks/commit-msg that rejects any subject that is not Conventional (feat: …, fix(scope): …).

    A commit-msg hook runs after you write the message, with the message file's path as $1; exiting non-zero cancels the commit. Teams use one to enforce Conventional Commits.

    Commands taughtcommit-msg-hook

    ▶ Play: The gatekeeperSOLUTION HIDDEN30 XP
  9. 88

    Level 88: Before the review

    Alone⏱ TimedHard

    Objective: In ~/bindery/search, turn feature/search into exactly 3 Conventional commits (box, results, tests), one file each, without the debug commit.

    Seven commits named wip, debug and fix test are your notes, not your story. Rebuild them into the commits a reviewer wants: any method that keeps the code works.

    ▶ Play: Before the reviewSOLUTION HIDDEN50 XP
  10. 89

    Level 89: Make it reviewable

    Boss⏱ TimedHard

    Objective: In ~/bindery/export, clean feature/export (fixup 'wip', reword to Conventional), install the team's commit-msg hook, and push with --force-with-lease.

    Your feature/export branch is already on origin and about to be reviewed. Fold the wip, fix the message, guard future messages, and publish the rewrite safely.

    ▶ Play: Make it reviewableSOLUTION HIDDEN100 XP

World 10The Lighthouse

9 levels

Mark the commits that ship: lightweight and annotated tags, publishing and fixing them, version names and signed tags.

  1. 90

    Level 90: A name for a commit

    GuidedEasy

    Objective: In ~/lighthouse/lamp, put the lightweight tag v0.1.0 on the current commit, then list the tags.

    A tag is a fixed name for one commit: unlike a branch it never moves. git tag NAME puts a lightweight tag (just a name, nothing else) on HEAD; git tag lists them.

    Commands taughtgit-tag

    ▶ Play: A name for a commitSOLUTION HIDDEN15 XP
  2. 91

    Level 91: Carved in stone

    GuidedEasy

    Objective: In ~/lighthouse/stone, make the annotated tag v1.0.0 on HEAD with the message 'First light', then look at it with hidden.

    git tag -a NAME -m MSG makes an annotated tag: a real object with the tagger, a date and a message (and room for a signature). Releases use annotated tags; lightweight ones are private bookmarks.

    Commands taughtgit-tag-annotated

    ▶ Play: Carved in stoneSOLUTION HIDDEN20 XP
  3. 92

    Level 92: Light the signal

    GuidedEasy

    Objective: In ~/lighthouse/signal, publish only the tag v1.1.0 to origin. The tag try-me must stay on your machine.

    hidden sends branches, not tags. Publish one tag with hidden origin TAG. hidden sends EVERY local tag, scratch ones included, so release managers push tags by name.

    Commands taughtgit-push-tags

    ▶ Play: Light the signalSOLUTION HIDDEN20 XP
  4. 93

    Level 93: Wrong rock

    AloneMedium

    Objective: In ~/lighthouse/beam, v1.2.0 (already on origin) sits on 'wip: blue glass test'. Put it, annotated, on 'feat: brighter lamp' instead, locally and on origin.

    git tag -d NAME deletes a local tag; hidden origin --delete NAME deletes it on the remote. Fixing a tag = delete both, re-tag, push. Only do it before anyone fetched it: once teammates have it, ship a new version instead.

    Commands taughtgit-tag-delete

    ▶ Play: Wrong rockSOLUTION HIDDEN30 XP
  5. 94

    Level 94: The keeper's tools

    GuidedEasy

    Objective: In ~/lighthouse/keeper, try each tag tool once.

    Tag tools for the nights ahead: hidden names a commit by its nearest tag, git tag -d deletes a tag here, hidden origin --delete removes one from the remote, and git tag -v checks a signed tag's signature.

    Commands taughtgit-describegit-tag-verify

    ▶ Play: The keeper's toolsSOLUTION HIDDEN20 XP
  6. 95

    Level 95: Where am I?

    AloneMedium

    Objective: In ~/lighthouse/log, save hidden's name for HEAD into version.txt.

    hidden names a commit after the nearest annotated tag behind it: v2.0.0-3-g1a2b3c4 = 3 commits after v2.0.0, at commit 1a2b3c4. Builds stamp it into their version string. Lightweight tags only count with --tags.

    ▶ Play: Where am I?SOLUTION HIDDEN25 XP
  7. 96

    Level 96: The keeper's seal

    AloneMedium

    Objective: In ~/lighthouse/vault, Mira signs every release (her key is imported). Check the three v3.0.x tags with git tag -v; delete the one that fails.

    A signed tag (git tag -s) carries a GPG signature made with the tagger's private key. git tag -v NAME checks it against public keys you trust: 'Good signature' or an error. A name in the Tagger line proves nothing: anyone can type 'Mira'.

    ▶ Play: The keeper's sealSOLUTION HIDDEN30 XP
  8. 97

    Level 97: Release night

    Alone⏱ TimedHard

    Objective: In ~/lighthouse/night, make v1.4.0 annotated on 'chore(release): 1.4.0' here and on origin (now lightweight, wrong commit) and remove tag tmp from origin.

    Release managers fix tags fast and in the open: annotated on the release commit, pushed by name, strays removed from the remote.

    ▶ Play: Release nightSOLUTION HIDDEN50 XP
  9. 98

    Level 98: First light

    Boss⏱ TimedHard

    Objective: In ~/lighthouse/tower: annotated v2.0.0 on the release commit, drop the 1.x tag failing git tag -v (both places), push only v2.0.0, describe > version.txt.

    Cut 2.0.0 like a release manager: an annotated tag on the release commit, no impostors on origin, only the release tag published, and a build stamped with hidden.

    ▶ Play: First lightSOLUTION HIDDEN100 XP

World 11The Beacon

11 levels

Ship versions people can trust: release notes from history, the right version number, releases on the forge, hotfixes on two lines, and undoing a bad merge.

  1. 99

    Level 99: Between two lights

    GuidedEasy

    Objective: In ~/beacon/notes, save the subject of every commit in v1.1.0 but not in v1.0.0 into notes-1.1.0.txt, one per line.

    A..B means: commits reachable from B but not from A. git log v1.0.0..v1.1.0 is exactly what changed in 1.1.0. --format=%s prints only the subjects.

    Commands taughtgit-log-range

    ▶ Play: Between two lightsSOLUTION HIDDEN20 XP
  2. 100

    Level 100: Notes for the sailors

    GuidedEasy

    Objective: In ~/beacon/changes, write CHANGES.md: every feat: and fix: subject since v1.1.0 as '- subject' lines, and nothing else.

    Conventional Commits make release notes a query: users care about feat: and fix:, not chore: or docs:. Several --grep options are OR'ed, and '^feat' matches the start of the message.

    Commands taughtgit-changelog

    ▶ Play: Notes for the sailorsSOLUTION HIDDEN25 XP
  3. 101

    Level 101: The right number

    GuidedEasy

    Objective: In ~/beacon/bump, read what changed since v1.4.2 and put the right next version on HEAD as an annotated tag.

    Semantic versioning MAJOR.MINOR.PATCH: only fix: since the last release → PATCH +1; any feat: → MINOR +1 (patch back to 0); a breaking change (feat!: or a 'BREAKING CHANGE:' footer) → MAJOR +1 (the rest to 0).

    Commands taughtsemver

    ▶ Play: The right numberSOLUTION HIDDEN25 XP
  4. 102

    Level 102: Raise the flag

    GuidedEasy

    Objective: In ~/beacon/flag (a clone from the team forge), push the tag v2.3.0 and publish it as a release titled 'v2.3.0' with notes.md as its notes.

    A release on a forge (GitHub, GitLab, Forgejo) is a pushed tag plus a title and notes, shown on the project page. The forge refuses a release for a tag it does not have. forge release create works like gh release create.

    Commands taughtforge-release

    ▶ Play: Raise the flagSOLUTION HIDDEN25 XP
  5. 103

    Level 103: Read the log, pick the number

    AloneMedium

    Objective: In ~/beacon/pick, tag HEAD with the correct next version after v3.2.1 (annotated), then push that tag to origin.

    Bumping is mechanical once you read the commits: any breaking change wins (MAJOR), else any feat (MINOR), else fixes only (PATCH). Look at bodies too: 'BREAKING CHANGE:' can hide in a footer.

    ▶ Play: Read the log, pick the numberSOLUTION HIDDEN30 XP
  6. 104

    Level 104: Patch the old light

    AloneMedium

    Objective: In ~/beacon/ship, bring only 'fix: lamp overheats' from main onto release/1.x and tag it v1.6.1 (annotated). The new features stay on main.

    Teams keep a release branch (release/1.x) for the version customers run while main moves on. A fix made on main is copied over with git cherry-pick -x (the -x adds '(cherry picked from commit …)'), then tagged as a patch release.

    Commands taughtrelease-branches

    ▶ Play: Patch the old lightSOLUTION HIDDEN30 XP
  7. 105

    Level 105: Undo a merge, carry a fix

    GuidedEasy

    Objective: In ~/beacon/dock, revert the bad merge with -m 1, then carry the hotfix over with cherry-pick -x.

    A merge commit has two parents, so git revert needs to know which side to keep: -m 1 keeps the first parent (the branch you merged INTO). git cherry-pick -x copies a commit and notes 'cherry picked from <hash>' in the message.

    Commands taughtgit-revert-merge

    ▶ Play: Undo a merge, carry a fixSOLUTION HIDDEN20 XP
  8. 106

    Level 106: Douse the bad merge

    AloneMedium

    Objective: In ~/beacon/storm, the merge of feature/fog broke main and a docs commit came after it. Undo the merge with a revert, keeping the docs commit and history.

    git revert of a merge needs -m 1: 'keep parent 1' (the main line) and undo what the merged branch brought. It adds a new commit, so it is safe on a pushed, shared main, unlike reset.

    ▶ Play: Douse the bad mergeSOLUTION HIDDEN35 XP
  9. 107

    Level 107: Light it again

    AloneMedium

    Objective: In ~/beacon/reland, feature/fog is fixed now. Land ALL of it on main (its first version was merged, then reverted): main's fog.sh must match feature/fog's.

    After reverting a merge, git still counts the branch's old commits as merged: merging it again brings only the NEW commits. To re-land everything, first revert the revert (git revert HASH-OF-THE-REVERT), then merge the fixed branch.

    ▶ Play: Light it againSOLUTION HIDDEN40 XP
  10. 108

    Level 108: Hotfix in five

    Alone⏱ TimedHard

    Objective: In ~/beacon/rush, on release/1.2: brightness=80 in lamp.conf, commit 'fix: restore brightness', annotated v1.2.1, push both; then cherry-pick it to main, push.

    Hotfix routine: fix on the release branch, tag the patch, push branch and tag, then bring the fix to main so it can't come back next release.

    ▶ Play: Hotfix in fiveSOLUTION HIDDEN60 XP
  11. 109

    Level 109: Release day

    Boss⏱ TimedHard

    Objective: In ~/beacon/day: CHANGES.md (feat/fix since v1.9.0), the right tag on HEAD, push + forge release -F CHANGES.md, then 'fix: lamp flicker' on 1.x as v1.9.1.

    Ship 2.0.0 end to end: notes from history, the right number, the tag on the forge, the release page, and the hotfix on the old line too.

    ▶ Play: Release daySOLUTION HIDDEN120 XP

World 12The Guild

14 levels

Work like a team: branches become pull requests, Mira reviews them, CI checks them, and protected main only takes green, approved work.

  1. 110

    Level 110: Ask, don't push

    GuidedEasy

    Objective: In lantern, make a branch add-amber that sets color=amber in lantern.conf, push it, and open a pull request for it.

    On a team, main is protected: nobody pushes to it directly. You push a branch and open a pull request (PR), a request to merge it that teammates can read, test and discuss; forge is the guild's GitHub, and forge pr create works like gh pr create.

    Commands taughtforge-pr

    ▶ Play: Ask, don't pushSOLUTION HIDDEN20 XP
  2. 111

    Level 111: Mira's notes

    GuidedEasy

    Objective: Mira requested changes on your pull request #1: read her comments, fix night.sh, push, and get her approval.

    A reviewer can approve or request changes, with comments on exact lines. You answer by fixing the code and pushing to the SAME branch: the pull request updates itself and the reviewer looks again.

    Commands taughtforge-review

    ▶ Play: Mira's notesSOLUTION HIDDEN20 XP
  3. 112

    Level 112: A tour of the desk

    GuidedEasy

    Objective: Read issue #1, check the CI of your PR #2 that fixes it, read the run's log, then squash-merge the PR.

    Try the everyday forge commands once: forge issue view N reads an issue, forge pr checks N shows a PR's CI result, forge run view ID --log a run's full log, forge pr merge N --squash --delete-branch merges as one commit and deletes the branch.

    Commands taughtforge-issueforge-ciforge-merge

    ▶ Play: A tour of the deskSOLUTION HIDDEN20 XP
  4. 113

    Level 113: Green and merged

    Alone⏱ TimedHard

    Objective: Push your branch fix-night, open a PR that fixes issue #1, make its checks green, get Mira's approval, and squash-merge it.

    CI runs the repo's checks (.forge/ci.yml) on every push and reports pass or FAIL on the PR: forge pr checks N, and forge run view ID --log shows why. Protected main merges only approved, green PRs; 'Fixes #1' in the body closes issue #1 on merge.

    ▶ Play: Green and mergedSOLUTION HIDDEN45 XP
  5. 114

    Level 114: Say why

    GuidedEasy

    Objective: Open an issue about the bell ringing at night, then open a PR for quiet-hours whose description has a ## heading and closes that issue.

    An issue records a problem or wish (forge issue create), and a PR description says what changed, why, and how it was tested, in Markdown: ## for headings, - for lists. A line like 'Closes #1' links the PR to issue #1 and closes it when the PR merges.

    Commands taughtmarkdown

    ▶ Play: Say whySOLUTION HIDDEN20 XP
  6. 115

    Level 115: The review desk

    GuidedEasy

    Objective: Read Mira's PR #1 and request changes, then check out her PR #2 and approve it.

    Reviewing other people's work has four moves: forge pr diff N (read the change), forge pr review N --request-changes -b TEXT (ask for a fix, naming file:line), forge pr checkout N (get the PR's branch to run it), forge pr review N --approve (say yes).

    Commands taughtforge-pr-diffforge-pr-checkout

    ▶ Play: The review deskSOLUTION HIDDEN20 XP
  7. 116

    Level 116: Spot the bug

    AloneMedium

    Objective: Read Mira's PR #1 and request changes, naming the file and line of the bug (file:line).

    Reviewing is reading: forge pr diff N shows exactly what a PR changes, + lines added, - lines removed. If something is wrong, request changes and point at the place as file:line, so the author finds it at once.

    ▶ Play: Spot the bugSOLUTION HIDDEN25 XP
  8. 117

    Level 117: Try before you trust

    AloneMedium

    Objective: Check out Mira's PR #1, run its test, and approve it if it passes.

    Reading a diff is half a review; the other half is running it. forge pr checkout N fetches the PR's branch into your clone and switches to it, so you can run its tests before you approve.

    ▶ Play: Try before you trustSOLUTION HIDDEN25 XP
  9. 118

    Level 118: One clean commit

    AloneMedium

    Objective: Fix what Mira asked on your PR #1 by amending its single commit, then update the PR so she approves.

    Some teams want one commit per PR: you fold review fixes into it with hidden --amend, which rewrites the commit. The forge still has the old one, so you update the PR with hidden, never plain --force.

    Commands taughtforge-update-pr

    ▶ Play: One clean commitSOLUTION HIDDEN30 XP
  10. 119

    Level 119: Main moved on

    AloneMedium

    Objective: PR #1 conflicts with main: update schedule with the new main, keep both changes in bell.conf, and push.

    While your PR waits, main moves; if it touched the same lines, the PR shows CONFLICTS. Bring main into your branch (hidden, then hidden or git merge origin/main), resolve, push: a rebase needs --force-with-lease, a merge a plain push.

    ▶ Play: Main moved onSOLUTION HIDDEN30 XP
  11. 120

    Level 120: The merge desk

    GuidedEasy

    Objective: Try each tool once in ~/guild/bell.

    hidden shows merged PRs too, forge pr edit N -b TEXT rewrites a description, merge --merge keeps a merge commit, --rebase replays commits. hidden drops deleted origin/ branches, hidden lists all, -D force-deletes.

    Commands taughtgit-prune-branchesforge-merge-methods

    ▶ Play: The merge deskSOLUTION HIDDEN20 XP
  12. 121

    Level 121: Three ways in

    AloneMedium

    Objective: Merge the three approved PRs, each with the method CONTRIBUTING.md asks for.

    forge pr merge N --merge adds a merge commit (the branch's history stays visible), --squash turns the whole PR into ONE new commit, --rebase replays each commit on top of main with no merge commit. Teams pick per kind of branch and write it in CONTRIBUTING.md.

    ▶ Play: Three ways inSOLUTION HIDDEN30 XP
  13. 122

    Level 122: Sweep the branches

    AloneMedium

    Objective: Delete feat-a and feat-b (both merged) on the forge and locally, prune stale origin/ branches, and keep feat-c.

    Merged branches pile up: hidden origin --delete NAME removes one on the forge, hidden -D NAME locally, and hidden forgets origin/ names that are gone from the forge. hidden -d refuses squash-merged branches (main got NEW commits), so check the PR first.

    ▶ Play: Sweep the branchesSOLUTION HIDDEN25 XP
  14. 123

    Level 123: Boss: closing time

    Boss⏱ TimedHard

    Objective: Review and squash-merge Mira's PR #2, update and squash-merge your PR #3 so it closes issue #1, then clean up every branch.

    Supper's in an hour. Mira's fix waits for your review, your own PR now conflicts with it, and the guild wants the issue closed and the branches gone.

    ▶ Play: Boss: closing timeSOLUTION HIDDEN80 XP

World 13The Council

12 levels

The council's ledger has rules, owners and impatient teammates: stack PRs, keep them small, review fast and recover when someone pushes over you.

  1. 124

    Level 124: Who owns db/?

    GuidedEasy

    Objective: Your PR #1 is blocked on a code owner review: find the owner, request their review, and merge it once approved.

    A CODEOWNERS file maps paths to the people who must approve changes there: 'db/ @mira' means any PR touching db/ needs Mira's approval when main protects it. The forge asks owners for review automatically; owners added later you request with forge pr edit N --add-reviewer.

    Commands taughtforge-codeowners

    ▶ Play: Who owns db/?SOLUTION HIDDEN20 XP
  2. 125

    Level 125: Not ready yet

    GuidedEasy

    Objective: Push export, open it as a draft PR, wait for its checks to pass, then mark it ready so Mira reviews and approves it.

    A draft PR (forge pr create --draft) is shared early: CI runs on it, but it can't be merged and reviewers wait. When it is done, forge pr ready N asks for review.

    Commands taughtforge-draft

    ▶ Play: Not ready yetSOLUTION HIDDEN20 XP
  3. 126

    Level 126: Tools for stacks

    GuidedEasy

    Objective: Try each tool once in ~/council/ledger: receipts builds on fees, which builds on main.

    forge pr create --base B opens a PR into B, not main. git rebase --onto NEW OLD BR moves only BR's own commits (after OLD) onto NEW. git restore --source=B FILE takes a file from branch B. git range-diff BASE V1 V2 compares two versions of the same commits.

    Commands taughtgit-rebase-ontoforge-small-prsforge-stackedgit-range-diff

    ▶ Play: Tools for stacksSOLUTION HIDDEN20 XP
  4. 127

    Level 127: A PR on a PR

    AloneMedium

    Objective: Your PR #1 (api) is in review and ui builds on it: push ui and open a PR that targets api, not main.

    When a second change builds on a first one still in review, open it with --base set to the first PR's branch: its diff shows only the new work. This is a stacked PR.

    ▶ Play: A PR on a PRSOLUTION HIDDEN25 XP
  5. 128

    Level 128: The stack, after the squash

    AloneMedium

    Objective: PR #1 was squash-merged: move ui onto main with only its own commit, update PR #2, and point it at main.

    After the base PR is squash-merged, its old commits are not on main, so the stacked branch still carries them. hidden replays only the commits between api and ui onto main; then retarget the PR with forge pr edit N --base main.

    ▶ Play: The stack, after the squashSOLUTION HIDDEN30 XP
  6. 129

    Level 129: Reading the room

    AloneMedium

    Objective: Read Bo's four comments on your PR #1 and tell kern the number of the one that must be fixed before merging.

    Review comments come in kinds: blocking (a bug, must change), nit (style, the author decides), question (answer it), and the occasional rude one. Good reviewers label theirs (nit:, question:) and explain why.

    Commands taughtreview-etiquette

    ▶ Play: Reading the roomSOLUTION HIDDEN20 XP
  7. 130

    Level 130: Three small PRs

    AloneMedium

    Objective: Branch big mixes docs/, db/ and report.sh changes: open three PRs from main, each with exactly one of those parts.

    Small PRs get reviewed in minutes, big ones in days. Split a mixed branch: a new branch from main per part, git restore --source=big PATH takes that part's files from the big branch, commit, push, open a PR.

    ▶ Play: Three small PRsSOLUTION HIDDEN35 XP
  8. 131

    Level 131: What changed since?

    AloneMedium

    Objective: Mira rebased PR #1: compare your saved fees-v1 with origin/fees and tell kern the number of the commit she really changed.

    After a rebase, hidden between two versions of a PR also shows everything main gained. git range-diff BASE OLD NEW pairs up the commits of both versions: = means unchanged, ! means that commit changed (its diff follows).

    ▶ Play: What changed since?SOLUTION HIDDEN25 XP
  9. 132

    Level 132: Three PRs, five minutes

    Alone⏱ TimedHard

    Objective: Review all three open PRs: request changes on the one with a secret and the one with a red build, approve the good one.

    Fast review is still review: diff for leaks (tokens, keys, passwords), checks for red builds, then a clear verdict. A secret in a PR must not merge, and must be rotated, since it already left the author's machine.

    ▶ Play: Three PRs, five minutesSOLUTION HIDDEN45 XP
  10. 133

    Level 133: Moving target

    Alone⏱ TimedHard

    Objective: Land your stacked PRs on main: merge #1, move ui onto main and retarget #2, then get it merged even if main moves under you.

    Some teams require PR branches to be up to date with main before merging, so every merge was tested on top of the latest main. When a teammate merges first, you fetch, rebase and push again.

    ▶ Play: Moving targetSOLUTION HIDDEN55 XP
  11. 134

    Level 134: Pushed over

    Alone⏱ TimedHard

    Objective: Get your monthly and yearly report commits back onto report, on top of Bo's weekly report, and push it.

    Bo force-pushed his version of a shared branch, and you synced to it with reset --hard: your commits seem gone, but hidden still lists where HEAD was. Put your commits back on top of his (git cherry-pick), then push: nobody's work is lost.

    ▶ Play: Pushed overSOLUTION HIDDEN50 XP
  12. 135

    Level 135: Boss: the fees motion

    Boss⏱ TimedHard

    Objective: Add db/002-fees.sql through the full loop: issue, draft PR, green CI, ready, Mira's approval as owner of db/, squash-merge, cleanup.

    The council wants fees in the ledger. Issue, branch, draft, CI, owner review, merge, cleanup: the whole loop, no hints.

    ▶ Play: Boss: the fees motionSOLUTION HIDDEN90 XP

World 14The Forge Line

9 levels

Every push goes down the line: CI runs the tests on a clean machine, and only green work reaches main.

  1. 136

    Level 136: Down the line

    GuidedEasy

    Objective: Push your branch tune, find the run it started, and tell Kern the name of the step that failed (kern NAME).

    A pipeline is the list of jobs CI runs on every push, each job a list of steps; the first failing step stops its job and turns the check red. hidden shows the runs, forge run view N --log the whole story.

    Commands taughtci-pipeline

    ▶ Play: Down the lineSOLUTION HIDDEN20 XP
  2. 137

    Level 137: Red to green

    GuidedEasy

    Objective: Your branch cooldown is red in CI: read the log, fix cool.sh (not the test), push, and get a green run.

    A red check is a question with an answer in the log: read the failing line, reproduce it on your machine, fix the code, push to the same branch, and CI runs again. Never 'fix' a test by weakening it.

    ▶ Play: Red to greenSOLUTION HIDDEN20 XP
  3. 138

    Level 138: Works on my machine

    AloneMedium

    Objective: tests/ember.sh passes here but fails in CI on branch ember: find what CI is missing, commit it, and push until green.

    CI starts from a clean checkout of exactly what you pushed: a file that is only on your disk does not exist there. Green locally, red in CI usually means something was never committed.

    Commands taughtci-clean-checkout

    ▶ Play: Works on my machineSOLUTION HIDDEN25 XP
  4. 139

    Level 139: YAML, one piece at a time

    GuidedEasy

    Objective: In ~/forgeline/yard, look at the repo's settings, then build a pipeline file one YAML piece at a time.

    Pipelines are YAML: plain 'key: value' lines. A line 2 spaces deeper sits INSIDE the line above, and a line starting with '- ' is one list item. hidden shows a repo's settings, like the checks main requires.

    Commands taughtyaml-basicsci-lintforge-protect

    ▶ Play: YAML, one piece at a timeSOLUTION HIDDEN20 XP
  5. 140

    Level 140: The gate holds

    AloneMedium

    Objective: Merge your pull request #1 into main: find out what main requires, and get it there honestly.

    Branch protection can require status checks: a pull request whose required check is red, pending or missing cannot merge. hidden lists main's rules, like a repo's branch protection settings page.

    ▶ Play: The gate holdsSOLUTION HIDDEN25 XP
  6. 141

    Level 141: Build the line

    GuidedEasy

    Objective: On a new branch add-ci, write .forge/ci.yml with a lint job and a test job, push it green, then protect main to require both.

    A pipeline is a file in the repo: .forge/ci.yml lists jobs, each with run: (one command) or steps:. Lint it before you push (ci-lint), and once it is green, make main require it.

    ▶ Play: Build the lineSOLUTION HIDDEN25 XP
  7. 142

    Level 142: Check before you send

    AloneMedium

    Objective: Add a pre-push hook that runs hidden, watch it stop your broken branch spark, then fix spark.sh and push it green.

    A pre-push hook runs on your machine before hidden sends anything: exit non-zero and the push stops. It is fast but skippable (hidden --no-verify), so teams use both: the hook for speed, CI as the rule.

    Commands taughtgit-pre-push

    ▶ Play: Check before you sendSOLUTION HIDDEN25 XP
  8. 143

    Level 143: Clean benches

    AloneMedium

    Objective: On branch bundle the test job can't find dist/bellows.conf: make the pipeline green, keeping both jobs and keeping dist/ out of git.

    Every job starts on a clean bench (a fresh checkout), so files one job builds are gone in the next. Build what a job needs inside that job, or pass it on as an artifact; build outputs never go into git.

    Commands taughtci-artifacts

    ▶ Play: Clean benchesSOLUTION HIDDEN30 XP
  9. 144

    Level 144: Boss: the kiln line

    Boss⏱ TimedHard

    Objective: Add a test job to the pipeline, land branch heat on main through a pull request with green checks, and add a pre-push hook.

    Protected main requires green lint and test checks, and the test job doesn't exist yet. Build the line, land your branch through it, and guard your own pushes.

    ▶ Play: Boss: the kiln lineSOLUTION HIDDEN70 XP

World 15The Foundry

9 levels

Real pipeline files: GitHub Actions and GitLab CI, matrix builds, secrets that never leak, flaky tests and bisect run.

  1. 145

    Level 145: Reading the blueprint

    GuidedEasy

    Objective: Read .github/workflows/release.yml and tell Kern which job never runs for a pull request (kern JOBNAME).

    A GitHub Actions workflow is a YAML file in .github/workflows/: on: says when it runs, jobs: what runs, runs-on: on which machine, steps: uses an action or runs a command. needs: orders jobs, and if: can skip one.

    Commands taughtgha-workflow

    ▶ Play: Reading the blueprintSOLUTION HIDDEN20 XP
  2. 146

    Level 146: Cast from the mould

    GuidedEasy

    Objective: On a new branch add-actions, create .github/workflows/ci.yml from templates/ci.yml with its blanks filled, lint it, and push it green.

    Workflows usually start from a template: copy it to .github/workflows/, fill the blanks, lint it. uses: actions/checkout@v4 fetches the code (pin a version after @), run: is a shell command.

    ▶ Play: Cast from the mouldSOLUTION HIDDEN25 XP
  3. 147

    Level 147: The other furnace

    AloneMedium

    Objective: The client mirrors to GitLab: on a branch add-gitlab, write .gitlab-ci.yml with stages lint then test (jobs lint and test), lint it, and push it green.

    GitLab CI reads one file, .gitlab-ci.yml: stages: lists the stages in order, and every other top-level key is a job with a stage: and a script: list. Jobs of a stage run together; the next stage starts when they pass.

    Commands taughtgitlab-ci

    ▶ Play: The other furnaceSOLUTION HIDDEN30 XP
  4. 148

    Level 148: Pieces of a workflow

    GuidedEasy

    Objective: In ~/foundry/pattern, build a workflow piece by piece, then write a matrix piece and an env piece.

    A GitHub Actions workflow is YAML with a few fixed keys: name:, on: (when it runs), jobs:, runs-on: (which machine), steps: with uses: (a ready-made action) or run: (a command). strategy: matrix: and env: come on top.

    Commands taughtgha-pieces

    ▶ Play: Pieces of a workflowSOLUTION HIDDEN20 XP
  5. 149

    Level 149: Many moulds, one pattern

    AloneMedium

    Objective: On branch matrix, replace the three copy-pasted jobs in .github/workflows/ci.yml with one job test that uses a matrix over size, and push it green.

    A matrix runs the same job once per value: strategy: matrix: size: [small, large] makes test-small and test-large, and ${{ matrix.size }} is the value inside each run. One job to maintain instead of copies.

    Commands taughtci-matrix

    ▶ Play: Many moulds, one patternSOLUTION HIDDEN30 XP
  6. 150

    Level 150: Keys stay in the vault

    AloneMedium

    Objective: The forge refuses your branch deploy because it contains a key: use the repository secret AWS_ACCESS_KEY_ID instead, rewrite the commit, and push it green.

    Never write a credential into a repo: store it as a repository secret and read it with ${{ secrets.NAME }} through env:, and never echo it. A key that reached any commit must be removed from the history (and rotated).

    Commands taughtci-secrets

    ▶ Play: Keys stay in the vaultSOLUTION HIDDEN35 XP
  7. 151

    Level 151: The flickering forge

    AloneMedium

    Objective: CI fails about 2 runs out of 3: find the flaky test, fix the test (not queue.sh), and push the fix on branch steady.

    A flaky test passes and fails on the same code: random data, timing, order. Find it by running it many times, then make it test what the code guarantees; retrying until green only hides it.

    Commands taughtci-flaky

    ▶ Play: The flickering forgeSOLUTION HIDDEN30 XP
  8. 152

    Level 152: Forty commits of silence

    Alone⏱ TimedHard

    Objective: main is red and v1.0 was green: find the first bad commit with git bisect run, tell Kern its hash, then hidden.

    When main turns red and nobody knows why, give git bisect run the exact command CI runs: it tests commits for you (exit 0 = good, non-zero = bad) and names the first bad one.

    Commands taughtci-bisect

    ▶ Play: Forty commits of silenceSOLUTION HIDDEN45 XP
  9. 153

    Level 153: Boss: light the foundry

    Boss⏱ TimedHard

    Objective: Turn Mira's draft into a working CI on branch add-ci, land it through a pull request with green checks, and make main require those checks.

    Mira left a broken draft workflow and the anvil has no real CI. Build the whole line, GitHub and GitLab, with a secret and a matrix, and make main require it.

    ▶ Play: Boss: light the foundrySOLUTION HIDDEN80 XP

World 16The Commons

11 levels

kernlib belongs to everyone and to Mira: you can't push to it. Fork it, keep your fork in sync, and get a change merged the open-source way.

  1. 154

    Level 154: Not yours to push

    GuidedEasy

    Objective: Fork mira/kernlib and clone your fork (guest/kernlib) into ~/commons.

    A fork is a server-side copy of someone else's repository that YOU own: you can push to it, and open pull requests from it back to the original. forge repo fork OWNER/NAME makes it; forge repo clone YOU/NAME clones your fork.

    Commands taughtforge-fork

    ▶ Play: Not yours to pushSOLUTION HIDDEN20 XP
  2. 155

    Level 155: Two remotes

    GuidedEasy

    Objective: This clone was made with plain git clone: add Mira's repo as upstream and fetch it.

    A clone of your fork only knows origin (your fork). By convention the original project is the second remote, upstream: git remote add upstream URL, then hidden gives you upstream/main.

    Commands taughtgit-upstream-remote

    ▶ Play: Two remotesSOLUTION HIDDEN20 XP
  3. 156

    Level 156: The fork falls behind

    GuidedEasy

    Objective: Mira added two commits upstream. Bring your local main AND your fork's main up to date.

    A fork does not follow the original by itself: when upstream gains commits, your fork's main stays old. Sync = hidden, hidden (or rebase) on main, then hidden.

    Commands taughtgit-upstream-remote

    ▶ Play: The fork falls behindSOLUTION HIDDEN20 XP
  4. 157

    Level 157: Read the house rules

    GuidedEasy

    Objective: Fix the 'Helo' typo in lib/greet.sh the way CONTRIBUTING.md asks, and open a PR to mira/kernlib.

    CONTRIBUTING.md holds the house rules: branch names, tests, changelog, sign-off. hidden -s adds 'Signed-off-by: You' (the DCO, not a cryptographic signature). Inside a fork's clone, forge pr create opens the PR against upstream from YOUR fork's branch.

    Commands taughtcontributing-md

    ▶ Play: Read the house rulesSOLUTION HIDDEN30 XP
  5. 158

    Level 158: The maintainer asks for more

    AloneMedium

    Objective: Mira requested changes on PR #1. Do what she asks, keeping the house rules, and get her approval.

    A maintainer can request changes on a PR from a fork just like on any PR. You fix it on the same branch in your fork: new commits pushed to origin show up in the PR at once.

    Commands taughtforge-update-pr

    ▶ Play: The maintainer asks for moreSOLUTION HIDDEN25 XP
  6. 159

    Level 159: Someone else pushed to my branch

    AloneMedium

    Objective: Mira pushed a test onto your PR branch. Your changelog commit isn't pushed yet. Get both onto the PR.

    'Allow edits by maintainers' (GitHub) lets the upstream maintainers push to your fork's PR branch, to add a test or fix a nit themselves. Then your branch on the fork has a commit you don't have: integrate it (hidden) before you push, never force over it.

    Commands taughtmaintainer-edits

    ▶ Play: Someone else pushed to my branchSOLUTION HIDDEN25 XP
  7. 160

    Level 160: The triangle

    AloneMedium

    Objective: Set up main so hidden reads from upstream and hidden writes to your fork.

    Triangular workflow: you pull from one remote (upstream) and push to another (origin, your fork). hidden (on main) makes hidden read upstream; hidden (or branch.main.pushRemote) makes hidden go to your fork.

    Commands taughtgit-triangular

    ▶ Play: The triangleSOLUTION HIDDEN25 XP
  8. 161

    Level 161: Patches by mail

    Alone⏱ TimedHard

    Objective: Apply Ada's patch from ~/inbox to main with git am, then write your docs branch's commit as a patch into ~/outbox.

    Before forges, and still for Linux and git itself, contributions travel as email patches. git format-patch turns commits into .patch files (author, message, diff); git am applies them as commits and keeps the sender as author (git apply only changes files).

    Commands taughtgit-format-patchgit-am

    ▶ Play: Patches by mailSOLUTION HIDDEN35 XP
  9. 162

    Level 162: Upstream won't sit still

    Alone⏱ TimedHard

    Objective: Upstream moved under your PR #1, and one change conflicts. Put the PR on the newest upstream main (it may move again), one signed-off commit, greeting fixed.

    While your PR is open, upstream keeps moving. If its new commits touch your lines, rebase your branch onto upstream/main, resolve, and update the PR with hidden. If it moves again, do it again.

    Commands taughtgit-upstream-remote

    ▶ Play: Upstream won't sit stillSOLUTION HIDDEN40 XP
  10. 163

    Level 163: Just the fix, please

    Alone⏱ TimedHard

    Objective: Your fork's main has a team tweak. Upstream has a security fix between two features. Get ONLY the fix onto your fork's main.

    A long-lived fork often carries its own changes and can't take all of upstream at once. git cherry-pick -x SHA copies one upstream commit onto your branch and notes '(cherry picked from commit …)' so everyone knows where it came from.

    Commands taughtgit-cherry-pick

    ▶ Play: Just the fix, pleaseSOLUTION HIDDEN40 XP
  11. 164

    Level 164: Boss: your first open-source merge

    Boss⏱ TimedHard

    Objective: Get the Helo typo fix merged into mira/kernlib from your own fork, following CONTRIBUTING.md, then sync your fork's main.

    The whole contribution: fork, clone, upstream, house rules, PR from the fork, review, a moving upstream on a protected main, merge, and a synced fork. No hints.

    ▶ Play: Boss: your first open-source mergeSOLUTION HIDDEN100 XP

World 17Keys & Trust

12 levels

The keyring holds the guild's doors: forge your own ssh key, prove who you are without a password, and learn when NOT to trust a server.

  1. 165

    Level 165: Forge a key

    GuidedEasy

    Objective: Make an ed25519 key pair at ~/.ssh/id_ed25519 with the comment guest@pathtoroot (no passphrase in this VM), then look at both halves.

    ssh logs you in with a key PAIR: a private key that never leaves your machine (~/.ssh/id_ed25519) and a public one you hand out (.pub). ssh-keygen -t ed25519 makes it (-C label, -f file). Real keys get a passphrase; this VM uses -N "" so nothing is typed.

    Commands taughtssh-keygenssh-key-pair

    ▶ Play: Forge a keySOLUTION HIDDEN20 XP
  2. 166

    Level 166: Show the door your key

    GuidedEasy

    Objective: Register your public key on the forge, list your keys, and knock with hidden.

    A server lets your key in once it knows the public half. On the forge that's forge ssh-key add FILE.pub (on GitHub: Settings → SSH and GPG keys, or gh ssh-key add). hidden then knocks without asking for a shell: the forge answers with your login name.

    Commands taughtforge-ssh-key

    ▶ Play: Show the door your keySOLUTION HIDDEN20 XP
  3. 167

    Level 167: Switch to ssh

    GuidedEasy

    Objective: This clone came over https and can't push here. Point origin at the ssh URL forge@forge:team/keyring.git and push your commit.

    A remote URL picks the door. https://forge/team/keyring.git wants a password or token; forge@forge:team/keyring.git (or ssh://forge@forge/team/keyring.git) uses your key. git remote set-url origin URL switches; branches and tracking stay.

    Commands taughtssh-remote-url

    ▶ Play: Switch to sshSOLUTION HIDDEN20 XP
  4. 168

    Level 168: A name for the door

    GuidedEasy

    Objective: Your forge key is ~/.ssh/work_ed25519, not the default name. Add a Host vault alias for it, point origin at vault:team/keyring.git and push.

    ~/.ssh/config names hosts. A block "Host vault" with indented HostName forge, User forge, IdentityFile ~/.ssh/work_ed25519 makes ssh vault, and the URL vault:team/keyring.git, mean: forge, as forge, with that key. First value found wins.

    Commands taughtssh-config

    ▶ Play: A name for the doorSOLUTION HIDDEN25 XP
  5. 169

    Level 169: The key keeper

    GuidedEasy

    Objective: Forge key ~/.ssh/forge_ed25519, no config: start an agent (hidden), load the key with ssh-add, check with hidden, then push.

    ssh-agent holds unlocked keys in memory and ssh asks it first. hidden starts one for this shell, ssh-add FILE loads a key (passphrase asked once), hidden lists them. That is why passphrases are bearable.

    Commands taughtssh-agent

    ▶ Play: The key keeperSOLUTION HIDDEN25 XP
  6. 170

    Level 170: Whose door is this?

    GuidedEasy

    Objective: Try each tool once from ~/keyring.

    Servers have keys too. ssh-keyscan HOST asks a server for its public host key (-t ed25519 = only that type). ssh-keygen -l prints a key's fingerprint, the short code admins publish; -f - reads the key from a pipe. ssh-keygen -R HOST removes that host's line from known_hosts.

    Commands taughtssh-known-hosts

    ▶ Play: Whose door is this?SOLUTION HIDDEN20 XP
  7. 171

    Level 171: A stranger at the door

    AloneMedium

    Objective: Pushing fails: the forge's host key changed. Read ~/keyring/NOTICE.md, compare the fingerprint, remove the stale entry from ~/.ssh/known_hosts and push.

    ssh remembers each server's key in ~/.ssh/known_hosts. If it changes, ssh refuses: rebuilt server, or someone in the middle? StrictHostKeyChecking: ask, accept-new, no (never). Compare with a fingerprint published somewhere you trust, then ssh-keygen -R HOST.

    ▶ Play: A stranger at the doorSOLUTION HIDDEN30 XP
  8. 172

    Level 172: Permission denied (publickey)

    AloneMedium

    Objective: hidden is denied. Find out why with hidden, fix it, and push.

    "Permission denied (publickey)": no key ssh offered was accepted. hidden shows the config read and every key Offered or skipped. Usual causes: key not on the forge, config points elsewhere, agent holds another key, private key readable by others.

    Commands taughtssh-debug

    ▶ Play: Permission denied (publickey)SOLUTION HIDDEN30 XP
  9. 173

    Level 173: Two keys, one forge

    AloneMedium

    Objective: id_ed25519 logs in as wanderer (no access to team/). Add a Host work alias that only uses ~/.ssh/work_ed25519, point origin at work:team/keyring.git, push.

    A forge knows you by the first key it accepts. With a personal and a work account, ssh may offer the wrong key first (agent or default files). A Host alias with IdentityFile plus IdentitiesOnly yes makes ssh offer ONLY that key.

    Commands taughtssh-identities-only

    ▶ Play: Two keys, one forgeSOLUTION HIDDEN30 XP
  10. 174

    Level 174: New laptop, release in five

    Alone⏱ TimedHard

    Objective: From nothing: make a key, register it, point origin at the ssh URL and push.

    A fresh machine has no key, and the repo was cloned over https. Everything from this world, in order, against the clock.

    ▶ Play: New laptop, release in fiveSOLUTION HIDDEN40 XP
  11. 175

    Level 175: Locked out

    Alone⏱ TimedHard

    Objective: Pushing fails, twice over. Make it work: the admins' NOTICE.md is in ~/keyring.

    Two faults at once: read each error, fix one, try again. ssh stops at the first wall, so the second one only shows after the first is gone.

    ▶ Play: Locked outSOLUTION HIDDEN45 XP
  12. 176

    Level 176: Boss: the release key

    Boss⏱ TimedHard

    Objective: Make ~/.ssh/release_ed25519, register it, add a Host release alias that offers only it, push main through it.

    The guild wants releases pushed with their own key, through their own alias, to a forge whose host key just changed. No hints.

    ▶ Play: Boss: the release keySOLUTION HIDDEN90 XP

World 18Seals

11 levels

Anyone can type any name into git config. A seal can't be faked: sign your commits and releases, and check the seals of others.

  1. 177

    Level 177: A seal of your own

    GuidedEasy

    Objective: Make a gpg signing key for Guest <guest@pathtoroot.local> (batch, no passphrase here) and list it.

    user.name proves nothing: anyone can commit as "Mira". A signature does. gpg --quick-gen-key "Name <email>" ed25519 sign never makes a signing key; real keys get a passphrase, this VM uses --batch --passphrase ''. hidden shows it.

    Commands taughtgpg-key

    ▶ Play: A seal of your ownSOLUTION HIDDEN20 XP
  2. 178

    Level 178: Seal a commit

    GuidedEasy

    Objective: Tell git which key to sign with, commit CHARTER.md signed, and verify it.

    hidden -S signs the commit with the key in user.signingkey (a gpg key id or fingerprint). git verify-commit REV checks it, git log --show-signature shows 'Good signature from …' for each commit.

    Commands taughtgit-commit-signgit-verify

    ▶ Play: Seal a commitSOLUTION HIDDEN20 XP
  3. 179

    Level 179: Seal a release

    GuidedEasy

    Objective: Make a signed tag v1.0 on main, verify it, and push it to the forge.

    Releases are tags, and a signed tag (git tag -s NAME -m MSG) says 'I vouch for this exact commit'. git verify-tag checks it. Tags aren't pushed by hidden: send them with hidden origin NAME.

    Commands taughtgit-tag-sign

    ▶ Play: Seal a releaseSOLUTION HIDDEN20 XP
  4. 180

    Level 180: Seal with your ssh key

    GuidedEasy

    Objective: Switch signing to your ssh key, make signing the default, and commit CHARTER.md.

    Since git 2.34 the ssh key you already have can sign: gpg.format ssh, user.signingkey ~/.ssh/id_ed25519.pub. commit.gpgsign true signs every commit without -S (tag.gpgSign the same for tags). GitHub and GitLab accept ssh signing keys too.

    Commands taughtgit-ssh-signing

    ▶ Play: Seal with your ssh keySOLUTION HIDDEN20 XP
  5. 181

    Level 181: Whose seal is this?

    GuidedEasy

    Objective: hidden fails. Create ~/.ssh/allowed_signers with your email and public key, point git at it, and show the signature.

    gpg has a keyring; ssh signing has an allowed signers file instead: one line per person, 'email key-type key'. gpg.ssh.allowedSignersFile points git at it; without it git verify-commit can't check ssh signatures at all.

    Commands taughtgit-allowed-signers

    ▶ Play: Whose seal is this?SOLUTION HIDDEN25 XP
  6. 182

    Level 182: The forged rule

    AloneMedium

    Objective: Someone slipped a rule into the charter in Mira's name. Mira signs everything. Find the commit and tell kern its hash (kern HASH).

    %G? in git log --format prints each commit's signature status: G good, N none, B bad, U good but untrusted, E can't be checked. A commit can claim any author; only the seal says who really made it.

    Commands taughtgit-log-signatures

    ▶ Play: The forged ruleSOLUTION HIDDEN30 XP
  7. 183

    Level 183: Two faces

    AloneMedium

    Objective: Repos in ~/work must commit as guest@guild.example, signed with ~/.ssh/work_ed25519.pub. Set it up with includeIf, then fix the last commit.

    Work email at work, yours at home. In ~/.gitconfig, [includeIf "gitdir:~/work/"] path = ~/.gitconfig-work loads that file only for repos under ~/work/: right email and signing key, no thinking. hidden shows which wins.

    Commands taughtgit-includeif

    ▶ Play: Two facesSOLUTION HIDDEN30 XP
  8. 184

    Level 184: Seal them all

    AloneMedium

    Objective: Sign the three commits of rules (only the signatures may change) and push the branch.

    Signing came too late for three commits. hidden replays and signs each one (hidden does too when commit.gpgsign is on). Same content, new commits: only for branches nobody built on.

    Commands taughtgit-resign

    ▶ Play: Seal them allSOLUTION HIDDEN30 XP
  9. 185

    Level 185: Release night, unsealed

    Alone⏱ TimedHard

    Objective: Sign the last commit on main, make an ssh-signed tag v2.0 on it, push main and the tag.

    Signing was switched off and the release commit went out bare. Seal it, tag it, ship both, before the release train leaves.

    ▶ Play: Release night, unsealedSOLUTION HIDDEN40 XP
  10. 186

    Level 186: Two candidates

    Alone⏱ TimedHard

    Objective: origin has two 'Release candidate' commits by 'Mira' (release-a, release-b). Only one is really hers. Tag it v3.0 (signed) and push the tag.

    Before you vouch for a commit with your own signed tag, check the seal of whoever made it: git verify-commit on each candidate, against your allowed signers.

    ▶ Play: Two candidatesSOLUTION HIDDEN45 XP
  11. 187

    Level 187: Boss: the guild seal

    Boss⏱ TimedHard

    Objective: includeIf for ~/work (guild email + work key), re-sign the release branch with that identity, push it with a signed tag v1.0.

    Your release branch in ~/work was committed with your personal face. Fix the identity for all of ~/work, re-seal the branch as the guild, and ship a signed release. No hints.

    ▶ Play: Boss: the guild sealSOLUTION HIDDEN90 XP

World 19Under the Hood

11 levels

Open the engine: blobs, trees, commits and tags in .git/objects, branches that are just files, and a commit built by hand.

  1. 188

    Level 188: Four kinds of things

    GuidedEasy

    Objective: ~/hood/mystery.txt holds one object's hash from ~/hood/engine. Find its type with git cat-file -t and tell Kern: kern blob, kern tree, kern commit or kern tag.

    Everything git stores is an object named by its hash: a blob (a file's content), a tree (a folder: names → blobs and trees), a commit (a tree + parents + author + message) or a tag (an annotated tag). git cat-file -t HASH says which; git cat-file -p HASH prints it.

    Commands taughtgit-cat-file

    ▶ Play: Four kinds of thingsSOLUTION HIDDEN20 XP
  2. 189

    Level 189: Content in, hash out

    GuidedEasy

    Objective: In ~/hood/vault, store spell.txt as a blob in the object database with git hash-object -w (don't stage or commit it).

    git hash-object FILE computes the hash git would give that content; with -w it also writes the blob into .git/objects. The name comes from the content alone, so the same bytes always get the same hash, in any repo, on any machine.

    Commands taughtgit-hash-object

    ▶ Play: Content in, hash outSOLUTION HIDDEN20 XP
  3. 190

    Level 190: Read the map

    GuidedEasy

    Objective: In ~/hood/archive, docs/key.txt changed after the tag v1. Tell Kern the blob hash it had AT v1 (kern <at least 7 characters>).

    git rev-parse turns any name into a hash: HEAD~2, v1, main^{tree}, and v1:docs/key.txt (the blob of that path at v1). git ls-tree -r COMMIT lists a commit's tree: mode, type, hash and path of every file.

    Commands taughtgit-ls-treegit-rev-parse

    ▶ Play: Read the mapSOLUTION HIDDEN25 XP
  4. 191

    Level 191: A branch is 41 bytes

    GuidedEasy

    Objective: In ~/hood/lamp, create the branch hotfix at 'Fix the lamp' by writing .git/refs/heads/hotfix yourself (no hidden).

    Look in .git: HEAD, config, objects/ (the database), refs/heads/ (branches), refs/tags/, logs/ (reflogs). A branch is a plain file in refs/heads/ holding one commit hash and a newline: 41 bytes. Creating a branch = writing that file.

    Commands taughtgit-refs

    ▶ Play: A branch is 41 bytesSOLUTION HIDDEN25 XP
  5. 192

    Level 192: The plumbing drawer

    GuidedEasy

    Objective: Try each plumbing command once in ~/hood/workbench.

    Small plumbing commands sit under branch, add and commit: symbolic-ref reads or sets HEAD's branch, update-ref writes a ref (-d deletes it), ls-files --stage lists the index, update-index --add stages a file, write-tree saves the index, commit-tree makes a commit.

    Commands taughtgit-symbolic-refgit-indexgit-plumbing-commit

    ▶ Play: The plumbing drawerSOLUTION HIDDEN20 XP
  6. 193

    Level 193: HEAD points at a name

    AloneMedium

    Objective: Clones of ~/hood/server.git come out empty: its HEAD names refs/heads/master, which does not exist. Point its HEAD at main.

    HEAD is usually a symbolic ref: the file .git/HEAD says 'ref: refs/heads/main', a pointer to a branch name, not to a commit. hidden reads it, hidden refs/heads/NAME sets it. In a bare server repo, HEAD picks the branch a fresh clone checks out.

    ▶ Play: HEAD points at a nameSOLUTION HIDDEN30 XP
  7. 194

    Level 194: Two answers, one winner

    AloneMedium

    Objective: In ~/hood/ledger, release shows 'Broken build' though .git/packed-refs says 'Release 1.2'. Point release at 'Release 1.2' (it's main's tip).

    To save files, git can pack refs into one file, .git/packed-refs (git pack-refs, gc). A loose file in refs/heads/ always wins over packed-refs. git update-ref <ref> <new-hash> moves any ref safely, wherever it lives, and logs it.

    ▶ Play: Two answers, one winnerSOLUTION HIDDEN30 XP
  8. 195

    Level 195: The index is a list

    AloneMedium

    Objective: In ~/hood/stage, stage motd.txt with the line 'Welcome aboard' WITHOUT creating the file (hash-object -w --stdin, then update-index). No commit.

    The index (.git/index) is the next commit's file list: mode, blob hash, stage number, path. hidden shows it. git update-index --add --cacheinfo 100644,HASH,PATH adds an entry for a blob that is already in the database, even if no such file exists in your folder.

    ▶ Play: The index is a listSOLUTION HIDDEN35 XP
  9. 196

    Level 196: Commit, by hand

    Alone⏱ TimedHard

    Objective: In ~/hood/handmade, recipe.txt is staged. Commit it on main as 'Add the recipe by hand' without hidden: write-tree, commit-tree, update-ref.

    hidden is three plumbing commands: hidden saves the index as a tree and prints its hash; hidden-tree <tree> -p <parent> -m <msg> makes a commit object and prints its hash; git update-ref refs/heads/main COMMIT moves the branch.

    ▶ Play: Commit, by handSOLUTION HIDDEN50 XP
  10. 197

    Level 197: Zero bytes

    Alone⏱ TimedHard

    Objective: In ~/hood/tower, main's ref file is 0 bytes. Rebuild it so main points at 'Top floor' again, with a clean hidden.

    A crashed script left .git/refs/heads/main empty: git now calls main a broken ref. The commits are all still in .git/objects. .git/logs/refs/heads/main (main's reflog) has one line per move: OLD NEW who when message. The NEW hash on the last line is main's latest value.

    ▶ Play: Zero bytesSOLUTION HIDDEN50 XP
  11. 198

    Level 198: The night press

    Boss⏱ TimedHard

    Objective: In ~/hood/press, fix HEAD, stage headline.txt with update-index, commit it on main as 'Print the headline', and tag it with the annotated tag edition-1.

    The press's repo is half-broken: HEAD has a typo, and the headline must go out as a proper commit with an annotated tag. Use the plumbing: you know what every command writes now.

    ▶ Play: The night pressSOLUTION HIDDEN100 XP

World 20The Salvage Yard

11 levels

Dead repos come here. Read every reflog, dig dangling commits out with fsck, pack the junk, heal corrupt objects, and float a wreck again.

  1. 199

    Level 199: Every branch remembers

    GuidedEasy

    Objective: In ~/salvage/kiln, someone ran hidden -f feature main and feature lost its two glaze commits. Put feature back where it was, using its reflog.

    HEAD has a reflog, and so does every branch: hidden lists where feature has been. feature@{1} means 'where feature was one move ago', feature@{3} three moves ago. Moving a branch you're not on (hidden -f) only shows in ITS reflog.

    Commands taughtgit-reflog-dates

    ▶ Play: Every branch remembersSOLUTION HIDDEN25 XP
  2. 200

    Level 200: As it was yesterday

    GuidedEasy

    Objective: In ~/salvage/diary, today's commits on main are a mess. Reset main to where it was yesterday (main@{yesterday}), working tree included.

    Reflog entries have times, so a ref can be named by date: main@{yesterday}, main@{2.hours.ago}, main@{2026-11-16}. That means 'where main was at that moment', from this repo's reflog. hidden shows the times.

    ▶ Play: As it was yesterdaySOLUTION HIDDEN25 XP
  3. 201

    Level 201: Dangling

    GuidedEasy

    Objective: In ~/salvage/kitchen, the 'secret spice' stash was dropped by mistake. Find it with hidden and get its change back into recipe.txt.

    An object no ref or reflog points to is dangling. A dropped stash is a dangling commit. hidden lists them ('dangling commit <hash>') and copies them to .git/lost-found/. They stay until git gc prunes them (after 2 weeks by default).

    Commands taughtgit-fsck

    ▶ Play: DanglingSOLUTION HIDDEN30 XP
  4. 202

    Level 202: Pack the attic

    GuidedEasy

    Objective: In ~/salvage/attic, check the loose objects with hidden, then pack everything with git gc so no loose objects remain.

    New objects are 'loose': one zlib file each in .git/objects/xx/. hidden counts them (count, size) and the packs (packs, size-pack). git gc packs them into one packfile (delta-compressed), packs refs, expires old reflog entries and prunes old unreachable objects.

    Commands taughtgit-gc

    ▶ Play: Pack the atticSOLUTION HIDDEN25 XP
  5. 203

    Level 203: The repair kit

    GuidedEasy

    Objective: Try each tool once in ~/salvage/yard.

    Four tools for a sick repository. hidden checks every object, packed ones too. hidden lets git tidy the repo in the background. git hash-object -w --stdin stores what you pipe in as a blob. git -C DIR runs git in another folder without cd.

    Commands taughtgit-maintenancegit-object-repair

    ▶ Play: The repair kitSOLUTION HIDDEN20 XP
  6. 204

    Level 204: What's so heavy?

    AloneMedium

    Objective: ~/salvage/hoard is huge though its files are tiny. Find the biggest object in its pack and tell Kern its hash (kern <at least 7 characters>).

    A pack is .git/objects/pack/pack-X.pack plus pack-X.idx. git verify-pack -v X.idx lists every object: hash, type, size, packed size… Sorting by size (column 3) finds the giants, even files deleted long ago that history still carries.

    Commands taughtgit-verify-pack

    ▶ Play: What's so heavy?SOLUTION HIDDEN35 XP
  7. 205

    Level 205: A bad minute

    AloneMedium

    Objective: In ~/salvage/dock, feature/map was deleted and main was reset --hard 2 commits back. Bring back both: main at 'Add the lights', feature/map at 'Mark the reef'.

    hidden -D deletes a branch AND its reflog, but HEAD's reflog still lists every commit you had checked out there. git reset --hard moved main; HEAD@{1} is where it was before.

    ▶ Play: A bad minuteSOLUTION HIDDEN35 XP
  8. 206

    Level 206: One pack to hold them

    AloneMedium

    Objective: ~/salvage/silo has several packs and loose objects. Repack it into exactly one pack with no loose objects, then register it for git maintenance.

    Every fetch or gc --auto can add a pack, and many packs slow lookups. hidden rewrites everything into ONE pack (-a) and deletes old packs and loose copies (-d). hidden opts the repo into background gc and repacks.

    ▶ Play: One pack to hold themSOLUTION HIDDEN35 XP
  9. 207

    Level 207: Bit rot

    Alone⏱ TimedHard

    Objective: In ~/salvage/mill, hidden reports a corrupt object. Heal it from ~/salvage/mill-backup so hidden is clean again.

    A disk error left a loose object unreadable; hidden names it. git never overwrites an existing object, so remove the bad file first, then write the content again from a good copy: git -C BACKUP cat-file blob HASH | git hash-object -w --stdin.

    ▶ Play: Bit rotSOLUTION HIDDEN50 XP
  10. 208

    Level 208: Before the sweep

    Alone⏱ TimedHard

    Objective: gc --prune=now runs at closing time. In ~/salvage/office, find the lost 'Signed contract' among the dangling commits and put the branch contract on it.

    With no reflog entry left, a lost commit is reachable only through hidden: hidden --unreachable --no-reflogs (or --lost-found) lists every unreachable commit. A branch on it makes it safe from hidden.

    ▶ Play: Before the sweepSOLUTION HIDDEN50 XP
  11. 209

    Level 209: Raise the wreck

    Boss⏱ TimedHard

    Objective: In ~/salvage/flagship: restore main from its reflog file, heal the corrupt object from ../flagship-backup, recover feature/radar, then git gc it clean.

    The flagship's repo hit every rock at once: main's ref file is empty, an object is corrupt, a branch was deleted. Repair the refs, heal the database, recover the branch, then pack it clean.

    ▶ Play: Raise the wreckSOLUTION HIDDEN120 XP

World 21The Giants

12 levels

Some repos are too big to carry, so take only the history, files and folders you need and cut the dead weight out.

  1. 210

    Level 210: Only the top floor

    GuidedEasy

    Objective: Clone file:///srv/git/atlas.git into ~/giants/atlas with only the newest commit (--depth 1).

    git clone --depth 1 URL downloads only the newest commit (a 'shallow' clone): great for CI, but log, blame and bisect see one commit. Use a URL (file:///srv/git/atlas.git here), since a plain local path ignores --depth.

    Commands taughtgit-clone-shallow

    ▶ Play: Only the top floorSOLUTION HIDDEN20 XP
  2. 211

    Level 211: I need the history after all

    GuidedEasy

    Objective: ~/giants/atlas is shallow: fetch the rest of its history so git log shows all 30 commits.

    A shallow clone can grow: hidden --deepen=10 adds 10 more commits, hidden fetches everything that's left and turns it into a normal clone. Needed when you must run git log, blame or bisect.

    ▶ Play: I need the history after allSOLUTION HIDDEN20 XP
  3. 212

    Level 212: Every commit, no luggage

    GuidedEasy

    Objective: Make a partial clone of file:///srv/git/atlas.git in ~/giants/atlas-lite: all history, no old file contents (--filter=blob:none).

    git clone --filter=blob:none URL brings every commit and folder listing (tree) but no file contents (blobs) beyond the checkout; old versions arrive on demand. History stays complete, and the server must allow it (GitHub and GitLab do).

    Commands taughtgit-clone-partial

    ▶ Play: Every commit, no luggageSOLUTION HIDDEN25 XP
  4. 213

    Level 213: Only my floors

    GuidedEasy

    Objective: In the monorepo ~/giants/mono, keep only services/api and docs checked out (cone mode).

    git sparse-checkout set DIR… keeps the repo whole but puts only those folders (plus top-level files) on disk. Cone mode (the default) takes folder names and is fast. hidden shows the folders, and every switch or pull respects them.

    Commands taughtgit-sparse-checkout

    ▶ Play: Only my floorsSOLUTION HIDDEN25 XP
  5. 214

    Level 214: The 400 MB folder

    GuidedEasy

    Objective: In ~/giants/site, remove build/ from all of history, delete the leftovers from disk, then ignore build/ for good.

    Someone committed build/ (in real life 400 MB), and deleting it in a new commit doesn't help because history keeps it. filter-branch --index-filter rewrites every commit without it (on a real job: git filter-repo, not in this VM), so warn the team about the new hashes.

    Commands taughtgit-filter-branch

    ▶ Play: The 400 MB folderSOLUTION HIDDEN35 XP
  6. 215

    Level 215: Tools for giants

    GuidedEasy

    Objective: Try each tool once: a sparse clone in ~/giants, then rewrite ~/giants/split.

    clone --sparse checks out only top-level files. filter-branch --subdirectory-filter DIR makes DIR the whole repo, history kept. A second filter-branch needs -f (the first left a backup in refs/original/). for-each-ref --format='%(refname)' lists refs.

    ▶ Play: Tools for giantsSOLUTION HIDDEN25 XP
  7. 216

    Level 216: Since July

    AloneMedium

    Objective: Clone file:///srv/git/chronicle.git into ~/giants/chronicle with only the commits since 2026-07-01.

    git clone --shallow-since=DATE brings only the commits made after that date (hidden --shallow-since works too). Handy when you need 'this quarter' of history, not a fixed number of commits.

    ▶ Play: Since JulySOLUTION HIDDEN25 XP
  8. 217

    Level 217: One more floor

    AloneMedium

    Objective: In ~/giants/mono (sparse: services/api), also check out libs/auth, then turn sparse-checkout off for a full test run.

    git sparse-checkout add DIR adds a folder and keeps the others (set would REPLACE the list). hidden shows it. hidden puts every file back on disk (the list is kept for later).

    ▶ Play: One more floorSOLUTION HIDDEN30 XP
  9. 218

    Level 218: The tools move out

    AloneMedium

    Objective: Make ~/giants/tools a repo whose root is the monorepo's tools/ folder, with only the commits that touched it.

    To give a folder its own repo with its history: clone the monorepo somewhere new, then git filter-branch --subdirectory-filter tools -- --all makes tools/ the root and keeps only the commits that touched it. Then hidden.

    ▶ Play: The tools move outSOLUTION HIDDEN35 XP
  10. 219

    Level 219: The runner is out of disk

    Alone⏱ TimedHard

    Objective: Fast: make ~/giants/ci-api the slimmest clone of file:///srv/git/mono.git: one commit, blob:none, only services/api checked out.

    CI clones on every push. Combine all three: --depth 1 (one commit), --filter=blob:none (only needed files), --sparse (only top-level files at first), then sparse-checkout set the folder the job builds.

    ▶ Play: The runner is out of diskSOLUTION HIDDEN45 XP
  11. 220

    Level 220: Raw photos on the server

    Alone⏱ TimedHard

    Objective: Fast: remove media/raw from main's whole history in ~/giants/press and publish the clean main to origin.

    When the bloat is already on the server: rewrite only your branch (-- main, not --all, so origin/main keeps showing the server's real tip), then hidden. Everyone else must re-clone or reset onto the new main.

    ▶ Play: Raw photos on the serverSOLUTION HIDDEN50 XP
  12. 221

    Level 221: Taming Titan

    Boss⏱ TimedHard

    Objective: Partial+sparse clone Titan, check out services/web and libs/ui, split libs/ui into ~/giants/ui, and purge its dist/ from that history.

    Titan: ten teams, ten years, one repo. Clone it the light way, check out only your folders, and give libs/ui its own repo without the bundle someone committed.

    ▶ Play: Taming TitanSOLUTION HIDDEN120 XP

World 22The Federation

12 levels

Many repos, one product: parallel worktrees, pinned submodules, merged subtrees, big binary files and a monorepo with owners.

  1. 222

    Level 222: Two desks, one repo

    GuidedEasy

    Objective: Leave ~/fed/app mid-feature: open a worktree ~/fed/hotfix on a new branch hotfix/login from main, and fix and commit the misspelled prompt in login.sh there.

    git worktree add PATH -b NEW-BRANCH START gives the same repo a second working folder on another branch. No stash, no re-clone: your half-done work stays where it is, and both folders share one .git (commits made in one are visible in the other).

    Commands taughtgit-worktree

    ▶ Play: Two desks, one repoSOLUTION HIDDEN25 XP
  2. 223

    Level 223: A repo inside a repo

    GuidedEasy

    Objective: In ~/fed/game, add file:///srv/git/fonts.git as a submodule at vendor/fonts and commit it.

    git submodule add URL PATH clones another repo into PATH and records a .gitmodules entry plus a 'gitlink': the exact commit it's pinned to. Commit both. (git blocks file:// submodules by default; this lab's ~/.gitconfig allows it.)

    Commands taughtgit-submodule

    ▶ Play: A repo inside a repoSOLUTION HIDDEN25 XP
  3. 224

    Level 224: Clone the whole family

    GuidedEasy

    Objective: Clone file:///srv/git/game.git into ~/fed/game2 with its submodule filled in.

    A plain git clone leaves submodule folders EMPTY; git clone --recurse-submodules URL fills them, each at its pinned commit (forgot, or a pull moved a pin? run hidden inside the clone).

    ▶ Play: Clone the whole familySOLUTION HIDDEN25 XP
  4. 225

    Level 225: Adopt a repo, keep its story

    GuidedEasy

    Objective: In ~/fed/site, bring file:///srv/git/ui.git in under vendor/ui/ with its history (a subtree merge).

    A subtree puts another repo INTO a folder of yours, history included. git subtree add isn't in this VM, so use the recipe it automates: merge -s ours --no-commit --allow-unrelated-histories (join histories), read-tree --prefix (place files), commit.

    Commands taughtgit-subtree-merge

    ▶ Play: Adopt a repo, keep its storySOLUTION HIDDEN35 XP
  5. 226

    Level 226: Rules per file type

    GuidedEasy

    Objective: In ~/fed/tools, commit a .gitattributes making *.sh LF-only and *.png binary, with deploy.sh re-stored without its CRLF endings.

    .gitattributes (committed) gives paths attributes: '*.sh text eol=lf' keeps scripts LF (CRLF breaks them on Linux), '*.png binary' means no diffs and no line-ending changes. hidden re-stores tracked files under new rules.

    Commands taughtgitattributes

    ▶ Play: Rules per file typeSOLUTION HIDDEN30 XP
  6. 227

    Level 227: Tools of the Federation

    GuidedEasy

    Objective: Try each tool once in ~/fed/band.

    submodule update --init fills empty submodule folders after a plain clone. git -C DIR fetch --tags gets new tags without cd. worktree remove --force drops a worktree with changes (lost). hidden sends those files through LFS (simulated).

    Commands taughtgit-lfs

    ▶ Play: Tools of the FederationSOLUTION HIDDEN25 XP
  7. 228

    Level 228: Desk cleanup

    AloneMedium

    Objective: From ~/fed/app2, remove the finished ~/fed/wt-done worktree properly and prune the stale ~/fed/wt-gone, keeping wt-review.

    hidden shows every worktree. git worktree remove PATH deletes a finished one properly (it refuses if there are uncommitted changes). If someone just rm -rf'd a worktree folder, git still lists it as 'prunable': hidden forgets it.

    ▶ Play: Desk cleanupSOLUTION HIDDEN30 XP
  8. 229

    Level 229: Move one pin

    AloneMedium

    Objective: In ~/fed/game3, fetch every submodule with foreach, then move vendor/fonts to its tag v2 and commit. vendor/sfx stays on v1.

    git submodule foreach CMD runs CMD in every submodule. To move a pin: check out the new commit inside the submodule, then git add its path in the parent and commit. hidden shows '+' while folder and pin disagree.

    ▶ Play: Move one pinSOLUTION HIDDEN35 XP
  9. 230

    Level 230: Big files, small pointers (SIM)

    AloneMedium

    Objective: In ~/fed/art, set up LFS with lfs-sim (install, track "*.psd") and commit .gitattributes and art/hero.psd as an LFS pointer.

    Git LFS: .gitattributes sends a pattern through the 'lfs' filter, so git add stores a 3-line POINTER (version, oid, size) and the real file goes to .git/lfs/objects and the LFS server. git-lfs isn't in this VM: lfs-sim does the same locally (real filters, real pointers).

    ▶ Play: Big files, small pointers (SIM)SOLUTION HIDDEN35 XP
  10. 231

    Level 231: The dead submodule

    Alone⏱ TimedHard

    Objective: Fast: remove the vendor/legacy submodule from ~/fed/game4 completely (config, .gitmodules, stored repo) and commit. vendor/fonts stays.

    Removing a submodule completely: git submodule deinit -f PATH (empties the folder, drops it from .git/config), git rm PATH (removes the gitlink and its .gitmodules entry), rm -rf .git/modules/PATH (its stored repo), commit.

    ▶ Play: The dead submoduleSOLUTION HIDDEN45 XP
  11. 232

    Level 232: Two repos, one roof

    Alone⏱ TimedHard

    Objective: Fast: bring file:///srv/git/billing.git into ~/fed/mono under billing/ with its history, and commit a CODEOWNERS giving /web/ to @mira and /billing/ to @dana.

    Merge a repo into a monorepo with its history: the subtree recipe (or git mv everything into billing/ in a clone, then merge --allow-unrelated-histories). Then CODEOWNERS: '/billing/ @dana' makes the forge ask the right reviewer per folder.

    Commands taughtmonorepo

    ▶ Play: Two repos, one roofSOLUTION HIDDEN55 XP
  12. 233

    Level 233: Release night

    Boss⏱ TimedHard

    Objective: Open a release/2.0 worktree, pin fonts to v2 there, commit sfx/theme.wav as an LFS pointer, push release/2.0, remove the worktree.

    Release 2.0 tonight, and you're mid-feature. Release from a second worktree: move the fonts pin, add the theme music through LFS, push, then tidy the worktree away.

    ▶ Play: Release nightSOLUTION HIDDEN120 XP

Final examThe Keeper's Exam

17 levels

Seventeen real repositories, ninety minutes, no hints: prove you can keep any history safe.

  1. 234

    Level 234: Task 1: a new vault

    Exam⏱ TimedHard

    Objective: Make ~/exam/vault a repository that ignores *.log files, and commit notes.md together with the .gitignore.

    Exam rules: one clock, no hints. Every task is a real repository; only its final state counts.

    ▶ Play: Task 1: a new vaultSOLUTION HIDDEN40 XP
  2. 235

    Level 235: Task 2: the stage

    Exam⏱ TimedHard

    Objective: In ~/exam/stage, take config.txt off the stage but keep its edit in the file, and throw away the edit to readme.md.

    git restore --staged unstages; git restore discards a working-tree edit.

    ▶ Play: Task 2: the stageSOLUTION HIDDEN40 XP
  3. 236

    Level 236: Task 3: who did it

    Exam⏱ TimedHard

    Objective: In ~/exam/blame, find who added the line 'timeout = 0' to settings.ini and tell Kern their name (kern <name>).

    git blame shows, for each line, the commit and the author who last changed it.

    ▶ Play: Task 3: who did itSOLUTION HIDDEN40 XP
  4. 237

    Level 237: Task 4: branches

    Exam⏱ TimedHard

    Objective: In ~/exam/branch, merge feature/menu into main (a fast-forward), delete feature/menu, and create a branch hotfix at the new main.

    A merged branch can go; a new branch is just a new name at a commit.

    ▶ Play: Task 4: branchesSOLUTION HIDDEN40 XP
  5. 238

    Level 238: Task 5: the conflict

    Exam⏱ TimedHard

    Objective: In ~/exam/conflict, merge feat-title into main. title.txt must end with feat-title's title (Kern's Kitchen) and keep the opening hours.

    A conflict: edit the file to the final text, git add it, hidden.

    ▶ Play: Task 5: the conflictSOLUTION HIDDEN40 XP
  6. 239

    Level 239: Task 6: undo a shared commit

    Exam⏱ TimedHard

    Objective: In ~/exam/revert, everyone already pulled 'Break the prices'; undo it without rewriting history (keep 'Add tea').

    Shared history is never rewritten: git revert adds a commit that undoes another.

    ▶ Play: Task 6: undo a shared commitSOLUTION HIDDEN40 XP
  7. 240

    Level 240: Task 7: a lost branch

    Exam⏱ TimedHard

    Objective: In ~/exam/reflog, the branch experiment was deleted; bring it back with both of its commits.

    hidden lists every commit HEAD stood on.

    ▶ Play: Task 7: a lost branchSOLUTION HIDDEN40 XP
  8. 241

    Level 241: Task 8: interrupted

    Exam⏱ TimedHard

    Objective: In ~/exam/stash, commit a fix for the typo 'eruo' in prices.txt on branch hotfix, then return to main with your menu.txt edit uncommitted and an empty stash.

    hidden shelves uncommitted work so you can switch; hidden brings it back.

    ▶ Play: Task 8: interruptedSOLUTION HIDDEN40 XP
  9. 242

    Level 242: Task 9: one commit

    Exam⏱ TimedHard

    Objective: In ~/exam/pick, bring only dev's 'Fix the oven timer' onto main.

    git cherry-pick copies one commit onto the current branch.

    ▶ Play: Task 9: one commitSOLUTION HIDDEN40 XP
  10. 243

    Level 243: Task 10: the first bad commit

    Exam⏱ TimedHard

    Objective: In ~/exam/bisect, hidden fails on main but passed on the first commit; find the first bad commit, tell Kern its hash (kern <hash>), and end the bisect.

    git bisect run CMD tests each step for you; hidden ends the hunt.

    ▶ Play: Task 10: the first bad commitSOLUTION HIDDEN50 XP
  11. 244

    Level 244: Task 11: rejected

    Exam⏱ TimedHard

    Objective: In ~/exam/push/shop, publish your commit 'Add the dessert menu' to origin main without losing what Mira pushed meanwhile.

    A rejected push means origin has commits you don't: integrate them first, then push.

    ▶ Play: Task 11: rejectedSOLUTION HIDDEN40 XP
  12. 245

    Level 245: Task 12: a tracked secret

    Exam⏱ TimedHard

    Objective: In ~/exam/untrack, stop tracking secrets.env (keep the file on disk), make git ignore it, and commit that.

    git rm --cached removes a file from the repo but not from the disk.

    ▶ Play: Task 12: a tracked secretSOLUTION HIDDEN40 XP
  13. 246

    Level 246: Task 13: fold the fixup

    Exam⏱ TimedHard

    Objective: In ~/exam/autosquash on feature/search, fold the fixup commit into 'Add search' so two commits are left: Add search, then Add filters.

    git rebase -i --autosquash puts every fixup! commit under its target for you.

    ▶ Play: Task 13: fold the fixupSOLUTION HIDDEN40 XP
  14. 247

    Level 247: Task 14: a draft PR

    Exam⏱ TimedHard

    Objective: In ~/exam/pr/bakery, fix oven.sh on branch fix-oven so CI passes (tests stay as they are), push it, and open a DRAFT pull request into main.

    The forge runs CI on every push; forge pr create --draft opens a PR that is not ready for review yet.

    ▶ Play: Task 14: a draft PRSOLUTION HIDDEN60 XP
  15. 248

    Level 248: Task 15: a workflow

    Exam⏱ TimedHard

    Objective: In ~/exam/actions/press, on a new branch add-ci, add .github/workflows/ci.yml running hidden on push, and push it: the run must be green.

    A workflow: on, jobs, runs-on, steps with run. ci-lint checks it before you push.

    ▶ Play: Task 15: a workflowSOLUTION HIDDEN60 XP
  16. 249

    Level 249: Task 16: a release

    Exam⏱ TimedHard

    Objective: In ~/exam/tag/app, tag main as v1.2.0 with an ANNOTATED tag and push the tag to origin.

    git tag -a makes an annotated tag (an object with a message); tags are pushed by name.

    ▶ Play: Task 16: a releaseSOLUTION HIDDEN40 XP
  17. 250

    Level 250: Task 17: catch up

    Exam⏱ TimedHard

    Objective: In ~/exam/upstream/lib (your fork), add /srv/git/upstream-lib.git as remote upstream, bring main up to date with it, and push main to origin.

    origin is your fork, upstream is the original: fetch upstream, merge upstream/main, push to origin.

    ▶ Play: Task 17: catch upSOLUTION HIDDEN40 XP

For teachers

Use these levels with a class

SOLUTION HIDDEN Teachers see answer keys in the classroom.

For teachers
ROOTSPIRE
DiscsFor teachers
▶ Play freeLibrary 16 discsDiscsFor teachersLog in