workflow finish

Finish a merged branch: switch to its base, catch the base up, and delete the branch

Synopsis

Finish the checked-out branch once its pull or merge request has merged: switch to its base, fast-forward the base from the base remote — upstream in a fork’s clone, else origin — with git pull –ff-only, and delete the branch: the three git commands the interface’s F runs. They are printed and confirmed before any runs, and a step git refuses stops the rest, keeping the branch.

A branch that cannot be finished is refused with the reason, and exits 4: its pull or merge request has not merged, it is the base itself or a detached HEAD, there is no base to return to, or it holds commits that neither merged nor are on its upstream, which deleting it would lose. The delete is a force delete, so it goes ahead only for a branch at the very commit that merged, or one whose upstream holds every commit on it.

workflow finish [flags]

Examples

  workflow finish --dry-run   # the three git commands, none run
  workflow finish --yes       # finish a merged branch, unattended

Options

  -h, --help   help for finish
  -y, --yes    go ahead without the confirmation

Options inherited from parent commands

  -n, --dry-run             hold back every write to Jira, the forge, the messaging service, Taskwarrior, git and files, and say what it would have done
      --log-format FORMAT   say what goes to stderr as FORMAT: text, or json or logfmt, an entry a line stamped with its time (default text)
  -q, --quiet               say only warnings, errors and questions on stderr, leaving every note out
      --request-log FILE    append a one-line outline of each request (method, path, status, duration) to FILE, for a bug report
      --verbose             also say each request's outline on stderr, as a debug line (not while the terminal interface draws)

SEE ALSO

  • workflow - Run your Jira, Git forge and messaging workflow, in the terminal or a browser