Skip to main content

Recovery and Safe Undo

Use this page when you need a safer mental model for undo and recovery.

Core Ideas

  • reset can affect references, index, and working tree
  • stash shelves unfinished work temporarily
  • reflog records local reference movement
  • recovery gets easier when you inspect first and act second

Best Local Sources