From ha
Merges a worktree branch into the current branch with preview, conflict resolution, merge/squash strategies, and post-merge options like cleanup and push.
npx claudepluginhub notedit/happy-coding-agent --plugin hcWorktree branch name to merge (e.g., "feature/login")git/# Git Worktree Merge Merge changes from a worktree branch into the current branch. ## Phase 1: Analyze Current State **Actions**: 1. `git branch --show-current` - get current branch 2. `git worktree list` - show all worktrees 3. `git status` - check for uncommitted changes **If uncommitted changes**: - Warn user - Ask: stash, commit, or abort? ## Phase 2: Select Source Branch **If `$ARGUMENTS` provided**: - Use as source branch name - Validate branch exists **If empty**: - List available worktree branches - Ask user to select one ## Phase 3: Preview Changes **Show merge preview**: ...
/worktree-mergeMerge a completed worktree branch back to main
Merge changes from a worktree branch into the current branch.
Actions:
git branch --show-current - get current branchgit worktree list - show all worktreesgit status - check for uncommitted changesIf uncommitted changes:
If $ARGUMENTS provided:
If empty:
Show merge preview:
git log --oneline <current>..<source>
git diff --stat <current>..<source>
Ask user:
Standard merge:
git merge <source-branch> --no-ff -m "Merge branch '<source>' into <current>"
Squash merge:
git merge --squash <source-branch>
git commit -m "<generated-message>"
If conflicts occur:
git add . && git commitAsk user:
/git:worktree-remove)Show summary:
| Strategy | Use Case |
|---|---|
| merge --no-ff | Preserve full history |
| merge --squash | Clean single commit |
| rebase | Linear history (advanced) |