When a finish stops

A finish that stops halfway waits for you. Continue it once the problem is fixed, or abort it and every branch goes back.

Finishing a branch takes a few Git steps: a merge, for a feature; for a release or a hotfix, a merge into production, a tag and a merge into integration. A merge can stop — on a conflict, on a Git hook that refuses the merge commit, on a merge commit that cannot be signed — and when one does after the first change, Innesta keeps the finish where it stopped rather than leaving you to work out which half was done.

The GitFlow button in the toolbar then reads Finish Paused, and its popover shows the paused finish in place of Start and Finish, with three answers: Continue Finish, Abort Finish and Discard. While a finish is paused, starting or finishing another branch is refused.

A step that fails earlier — before the first merge, the tag or a moved branch — leaves nothing to pause, and the message says why.

Continue Finish

Fix what stopped it — for a conflict, resolve the files — and choose Continue Finish. Innesta commits the stopped merge and carries on with the steps that are left: the tag, the other merge, the git-flow hook that runs afterwards, deleting the branch, pushing the tag. The one that runs before the finish is not run again.

What is already done is read from the repository each time, not from a list Innesta kept, so a merge or a tag that is already there is not made twice.

Before it commits anything, Continue refuses if the branch you are finishing has gained commits since the finish started, if the finish’s tag has been replaced or is no longer on the production branch, or if another merge is in progress.

Abort Finish

Abort Finish asks first, in Abort the Paused Finish, and then puts the repository back: it abandons the stopped merge, moves every branch the finish merged into back to where it was before, deletes the tag the finish made if it is still that tag, and checks the branch you were finishing out again.

Each merge it undoes is kept in Recovery, under Hard Resets, like any other branch moved back.

It refuses, before changing anything, when a merge it would undo is already on a remote branch or has other commits on top of it: moving that branch back would take away work that is not the finish’s. Two things stay as they are: a rename or a version-file commit made on the branch before the first merge, and a local branch the finish created from its remote copy.

Discard

Discard forgets the paused finish and leaves every branch as it is now, without asking, because it moves nothing. A merge still in progress stays, as an ordinary merge. It is the answer for a finish you have already completed or undone yourself, in a terminal for instance.

From the status bar

While the merge in progress is the finish’s own, Continue and Abort in the status bar act on the whole finish: Continue continues it, and Abort aborts it, with the same confirmation. Any other merge keeps its usual Continue and Abort.

Where it is kept

Innesta writes down what the finish is about to do before its first merge, in innesta-gitflow-finish.json in the worktree’s Git directory: the branch and its tip, the tag and its message, where each branch it merges into was before, whether the commits are signed, the remote branch to delete, and the remote the tag is pushed to. It is inside .git, so it is never committed or pushed.