Working with Git

Undo and file recovery

Take back the last operation, and get back anything you discarded.

Undo

⌘Z, when you’re not typing in a field, takes back the last thing Lusca did, up to 50 steps:

  • a commit or amend, whose changes come back staged
  • a cherry-pick, revert, merge or pull
  • a reset, a branch switch, or making, renaming or deleting a branch or tag

Undo won’t take back anything you’ve pushed, and never throws away uncommitted changes. If a branch has moved since, it changes nothing and tells you why. What can be undone is kept until you quit or open another repository.

File recovery

Every discard keeps a checkpoint in .git/narwhal/recovery, so nothing is lost by accident.

  • File › File Recovery… lists the checkpoints. From there you can put back missing files; nothing already there is replaced.
  • Checkpoints are removed after 14 days, or once together they take more than 1 GiB. The latest one is always kept.
  • If a discard stops part way, a banner asks you to review it.