Merge changes from a worktree branch into current branch
Merges changes from a worktree branch into the current branch with conflict handling.
/plugin marketplace add notedit/happy-coding-agent/plugin install notedit-happy-coding-agent@notedit/happy-coding-agentWorktree branch name to merge (e.g., "feature/login")git/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) |