wt-finish

star 2

Squash, rebase, fast-forward into the default branch, then remove the worktree

MichaelVessia By MichaelVessia schedule Updated 5/4/2026

name: wt-finish description: Squash, rebase, fast-forward into the default branch, then remove the worktree allowed-tools: Bash(wt merge:), Bash(wt list:), Bash(git status:), Bash(git branch:)

Context

  • Current branch: !git branch --show-current
  • Working tree: !git status --short

Your task

Finish the current feature branch locally using wt merge.

  1. Verify we're on a feature branch (not the default branch). If we're on the default branch, stop and tell the user there's nothing to merge.
  2. If the working tree has uncommitted changes, report them and ask the user whether to include them (wt merge will stage+commit by default) or bail.
  3. Run wt merge. This squashes commits since the branch point, rebases onto the default branch, fast-forwards the default branch, and removes the worktree. The shell will land back at the repo root.
  4. Report the resulting commit sha on the default branch and stop.
Install via CLI
npx skills add https://github.com/MichaelVessia/nixos-config --skill wt-finish
Repository Details
star Stars 2
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator
MichaelVessia
MichaelVessia Explore all skills →