Part of the Git, Zero to Hero
Build & submit taskBetaintermediate

Git Escape Room: Undo Five Disasters

A repository after a very bad afternoon, with five locks to open: rescue a deleted branch from the reflog, undo a shared merge with a revert, fix an unpushed commit's message, turn a stash into a commit and bring back a file deleted long ago. Three locks hide the door code. A local self-check verifies every lock and writes your submission for instant, rubric-based feedback.

45 min

Est. time

3

Outcomes

4

Rubric criteria

60%

Pass score

What you'll learn

Skills you'll have real reps in after shipping this.

Deleting or resetting a branch only removes a name: the reflog keeps the commits' IDs, and a new name brings them back.
On a branch others have pulled, undo with git revert, which adds a commit, and never with reset plus force-push.
Amend and reword make new commits, which is fine for work nobody else has yet.

The scenario

Bean There's repository had a very bad afternoon. Priya's secret menu branch was deleted before anyone merged it. A dark theme was merged into main and pushed, and now the site is black text on a black background. Sam's unpushed fix has a typo in its message, Alex's tidy-up deleted the allergens page along with the junk, and the loyalty card draft is sitting in a stash.

Nothing is truly lost, and main is already on the shared server, so the fixes have to respect what other people may have pulled. Open all five locks and read the door code on the way out.

Your role

You are the teammate who knows how to undo things. Your deliverable is a repository where every lock is open: secret-menu restored on its last commit, the dark theme undone by a revert with main's history intact and pushed, fix-hours reworded without changing its content, the loyalty card draft committed on its own branch with no stash left, allergens.md back on main exactly as it was, and notes with the door code and your reasoning.

Start the task to unlock the full brief

You'll get the step-by-step requirements, setup commands, the 4-criterion grading rubric, tips, and the ability to submit your solution for instant AI grading.

Free to start · submit when you're ready

Practise undoing Git mistakes in an escape room

The best way to stop fearing Git mistakes is to fix a pile of them. This escape room gives you a repository after a very bad afternoon: a deleted branch, a broken merge already pushed, a typo in a commit, a forgotten stash and a file deleted weeks ago. You rescue each one with the reflog, revert, amend, stash and restore, without rewriting the history your team shares, and collect the door code on the way. A local self-check verifies every lock and writes your submission only when all five are genuinely open. It is the Level 4 project in Preporato's Git course.

Frequently asked questions

What Git commands does the escape room use?

git reflog and git branch to rescue a deleted branch, git revert -m 1 to undo a pushed merge, git commit --amend (or git history reword) to fix a message, git stash branch to turn a stash into a commit, and git restore --source to bring back a deleted file. Every one is taught in Level 4 of the course.

Can I break something for good?

No. Run bash setup.sh at any time to rebuild the room from scratch. check.sh also tells you if the shared history was rewritten, so you know when to start over.

Do I need GitHub for this project?

No. The shared server is a folder in the kit, so everything works offline.