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

  1. 01Soft
  2. 02Mixed
  3. 03Hard
  4. 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.

← All Git labs

Your first machine is
8 seconds away.

Learn by doing on real machines — and give every AI agent one of its own.

Free forever · No credit card · Cancel anytime

Compare Soft, Mixed and Hard Reset — Git lab | Kube Labs