WeCodeAcademy

Challenge: Three Emergencies

Three small emergencies. Run each step and read what Git tells you.

1. A typo you have not committed. Throw it away.

Examplebash
Open in editor »
/ $

2. A commit that was too early. Undo it but keep the work.

Examplebash
Open in editor »
/ $

3. An urgent fix while you are mid-task. Shelve, fix, come back.

Examplebash
Open in editor »
/ $

Now try your own: in the terminal below, make a change to page.txt, stash it, check git status, then git stash pop.

Quick check

You committed too early and want to keep the edits but redo the commit. Which do you use?

Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.

Tip: use the left and right arrow keys to move between lessons.