Docs

What undo covers

Cmd+Z takes back the last thing Kelp did to your repository, and Cmd+Shift+Z does it again. Undo would rather refuse than lose your work.

What it covers

Anything Kelp changes in your repository on your Mac can be undone:

Hover the Undo button in the toolbar to see what it will undo before you press it.

How it works

Before each action, Kelp notes where your branches, tags and stashes point and saves a snapshot of your staged and unstaged files. Undo puts all of it back the way it was.

What it refuses, and why

When an action can't be undone, hovering the Undo button tells you why. These are the cases:

ActionWhy undo refuses
The repository changed since, for example you committed from the terminalGoing back would throw away the newer change. Kelp says so and changes nothing.
Push, deleting or renaming a remote branch, pushing or deleting a remote tagIt changed the remote. Other people may already have what you pushed.
Fetch and pruneFetching only updates remote branches, so there is nothing of yours to put back.
Adding, removing, moving or pruning a worktreeWorktree folders live outside the repository and are not tracked by undo.
Updating a submoduleSubmodules are separate repositories.
Adding, renaming or removing a remote, or changing its URLRemote settings are not tracked by undo.
Discarding more than 16 MB of new, never committed files at onceKelp keeps a copy of new files so it can bring them back, and it will not hold that much in memory. It still asks before it discards.
If you need to take back a push, make a new commit that reverts it (right-click the commit, then Revert) and push that. It's the safe way to undo shared history.

The reflog safety net

Git remembers every place your branches and HEAD have pointed to, even after a reset or a rebase. This list is the reflog, and it is how you get back work that looks lost after undo can't help, for example after you quit Kelp.

By default git keeps reflog entries for lost commits for 30 days, and 90 days for everything else, so a lost commit is usually still there weeks later.