Explain how wt merge works
Steps in the selected run
Worktrunk's wt merge takes a finished branch to main in one
command. The film draws each step from the flags below it, so ticking
--no-ff or a failing test re-plots the run. Tap or hover a
commit, branch, worktree or hook to read its details; Inspect cycles
through them. Alt-click a part to comment on it.
-
A branch in its own worktree, with commits and perhaps edits not yet committed. Main may have moved on since the branch forked.
-
Uncommitted edits become a commit of their own. The default run skips this, because the squash stages them itself.
-
Every commit since the fork, plus any edits, becomes one commit. The old tip is backed up to
refs/wt-backup/<branch>first, so the squash can be undone. -
The work is replayed onto main's current tip, which gives it new hashes. A conflict stops the merge here, with the rebase left open to resolve.
-
Hooks from
.config/wt.tomlrun on the exact tree that will land, as local CI. A failure aborts, and main never moves. -
Main fast-forwards to the branch tip, so history stays linear.
--no-ffrecords a merge commit instead. -
A last hook before the worktree is deleted; if it fails, the worktree stays.
-
The worktree and branch are removed in the background, and the shell lands in main's worktree.
-
Background hooks run from main after the prompt is back.
-
Where the run ended, and what it did.