Deleting and restoring branches

What a deleted branch takes with it, and how to get it back.

Deleting a branch loses nothing while every commit on it can still be reached another way: from another local branch, a remote branch or a tag. A branch you have merged is the usual case — its commits are on the branch you merged into. Deleting one whose commits exist nowhere else loses them.

Innesta will not let you find that out afterwards. Delete, in the branch’s context menu, opens Delete Branch, which lists the commits at risk under Unique commits — the ones that exist only on this branch and would have no other name pointing at them — with Open Diff… to read what they change. The list under it, Not merged into HEAD, is for information: a commit another branch or tag still has is not at risk.

If there are no unique commits, the deletion is uneventful. If there are some, Delete Branch stays unavailable until you tick Force deletion, so the commits go only once you have seen them. The box starts unticked every time.

Restoring

Innesta takes a local backup of every branch it deletes — kept for seven days unless Settings says otherwise — and the Recovery section in the sidebar is where you restore from. See restoring a deleted branch.

That is a backup Innesta made, and it is separate from the reflog, which Git maintains anyway. Both are usually enough on their own; having both is why deleting a branch here is a smaller decision than it is on the command line.

Remote branches

Deleting a local branch does not delete the remote one. They are separate refs that happen to share a name, and Innesta keeps that distinction rather than tidying both away on your behalf — deleting someone else’s copy of a branch because you were finished with yours is not a favour.