Compare Soft, Mixed and Hard Reset
Three disposable clones, three practice commits each. Squash with --soft, uncommit with --mixed, discard with --hard — and see that the reflog still remembers.
Project labintermediate~30 minPro
What you'll do
- ✓Describe what each reset mode does to HEAD, the index and the working tree
- ✓Squash unpublished commits with a soft reset
- ✓Recover with ORIG_HEAD and the reflog
- ✓Keep destructive practice away from real work
Lab outline
- 01Soft
- 02Mixed
- 03Hard
- 04Reflog
Before you start
- Restoring files (git-21)
Every lab runs on a real machine of your own in the browser — no installs, nothing to clean up — and checks your work automatically as you go.