Discarding changes

Throwing work away on purpose — with a preview, a confirmation, and a backup you can get it back from.

Discarding returns a file to what it was at your last commit. It is the one everyday operation that destroys work, and Innesta treats it that way: you see what will go, you confirm, and a copy is kept.

⌥⌘⌫ discards the selection. The ellipsis is not decoration — the command always asks first.

What you see before it happens

A preview of exactly which changes will be lost, as a diff. Not a count of files, not a list of names: the changes themselves, so a file you had forgotten you edited cannot go quietly.

Then a confirmation, which you have to answer.

What is kept

Two things, and the confirmation says so before you agree to it.

A local backup of everything discarded, which the Recovery section in the sidebar lets you read and restore, kept for seven days unless Settings says otherwise. And, for any file still on disk when you discard it, a copy of its current contents in the macOS Trash.

This is why discarding in Innesta is a smaller decision than git checkout -- in a terminal: the terminal version is genuinely irreversible, and this one is not.

Untracked files

A file Git has never seen has nothing to go back to, so discarding it deletes it. Innesta says so in the confirmation rather than lumping it in with the rest, and it is backed up like everything else: the recovery backup is made with untracked files included, and the file’s contents go to the Trash with the others.

What it will not do

A file with an unresolved conflict cannot be discarded. Discard is switched off for a selection containing one, and says why: resolve the conflict or take a side first.

A whole folder

With the file list showing the folder hierarchy, a folder can be discarded in one action. It goes through the same preview, the same confirmation and the same backup, and the preview shows every file it covers.