Skip to content

finish

Clean up finished work: remove a landed worktree or step off a merged branch.

The inverse of start for work whose pull request has already merged. Without REF or --all: inside a linked worktree, removes it and its local branch; in the main checkout on a merged branch, switches onto an up-to-date main and removes the branch. With REF (an issue number, worktree name, or local branch name), cleans up that one target. With --all, cleans up every merged worktree and local branch in this repository without touching caches or the state store.

Work that is unmerged, dirty, or holds commits ahead of its merged pull request is always kept and named.

fm finish <ref> [--all] [--dry-run]
Parameter Type Default Description
<ref> required issue number, worktree name, or branch name to clean up
--all flag false clean up every merged worktree and branch in this repository
--dry-run flag false say what would be cleaned up, touch nothing

Example

$ fm finish <ref> --all