Merge all git worktree changes back to main with AI-generated commit
Merges all git worktree changes into main with a single AI-generated commit message.
/plugin marketplace add ClementWalter/rookie-marketplace/plugin install git-master@rookie-marketplaceMerge all active worktree changes back to the main branch with a single, comprehensive AI-generated commit message.
Run git worktree list to show all worktrees and their branches.
For each worktree (excluding the main one):
git -C <worktree-path> status --porcelaingit -C <worktree-path> log main..<branch> --onelinegit -C <worktree-path> diff main --statDisplay a table showing:
| Worktree | Branch | Uncommitted | Commits Ahead | Files Changed |
|---|
Ask user to confirm which worktrees to merge.
For worktrees with uncommitted changes, commit them first with descriptive messages.
For each confirmed worktree:
git merge --squash <branch>Create a comprehensive commit message in this format:
<type>: <concise summary covering all merged work>
Merged branches:
- <branch-1>: <what was accomplished>
- <branch-2>: <what was accomplished>
<detailed description of the combined changes>
Where <type> is one of: feat, fix, refactor, chore, docs, test
git worktree remove <path>git branch -d <branch>Show git log -1 and git worktree list to confirm the result.