World map

 

BM: Baca dalam Bahasa Melayu

World 2: Undo Magic · Boss challenge

Escape room: 6 disasters

You will learn: to fix six Git disasters in a row, without panic.

The problem

Trouble in every area: debug.log in the working folder, secret.txt in the box and a commit called Add day 2 entyr. They all wobble.

Six Git disasters. One locked room. Fix them all to escape!

Watch

git status in room 1. secret.txt and index.html are both in the box. A hint line names the command to unstage. Terminal output: $ git status On branch main Changes to be committed: (use "git restore --staged <file>..." to unstage) modified: index.html new file: secret.txt

Each room is a real terminal. Stuck? Try git status first. After 2 tries, a hint appears. Mistakes are free, so experiment!

Try it

Fix each disaster to unlock the next room.

Disaster 1 of 6: Wrong file staged

secret.txt jumped into the box. Take it out. Keep index.html in.

Working folder
  • Empty
Staging area
Repository
  • 3 save points
  • Add style
  • Add day 1 page
  • Add README
6d3a9b1a8feb63270a76e

Check

A bad commit is already shared. Which fix is safe?

Pick one answer.

Check

Which mistake can the reflog NOT fix?

Pick one answer.

You did it!

You can now escape almost any Git disaster.