Gitflow
🧟Repository CorruptionExpert+900 XP
Workshop
Scenario reference

Repository Corruption: the situation, step by step

The situation

Power loss mid-commit. `git status` now errors: 'object file is empty'. Your local clone has corrupted objects.

fsck identifies corruption. Re-fetch missing objects from origin to repair.

Expert · 3 steps · +900 XP

What you will practice

This scenario walks through 3 steps, in order:

  1. 01Run fsck to find broken objects
  2. 02Re-fetch every ref from origin
  3. 03Verify integrity again
Reveal the step-by-step commands

Try the terminal first — you learn more by doing. When you want to check yourself, here is the command for each step.

  1. 1. Run fsck to find broken objects
    git fsck --full
  2. 2. Re-fetch every ref from origin
    git fetch --all
  3. 3. Verify integrity again
    git fsck --full

Key takeaway

fsck → identify → re-fetch (or worst-case, re-clone). Always have a remote.