cmd-worktree-merge
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/worktree-merge
/worktree-merge
Agent skill wrapper for the Claude command .
/worktree-mergeWhen the original command text references , , or named arguments, map them from the user's current request.
{{INPUT}}$1用于Claude命令的Agent技能封装。
/worktree-merge当原始命令文本引用、或命名参数时,从用户当前请求中映射这些参数。
{{INPUT}}$1Command Instructions
命令说明
Merge all git worktrees under the directory into the current branch.
.trees/将目录下的所有git工作树合并到当前分支。
.trees/Steps
步骤
- Run to identify worktrees in
git worktree list..trees/ - For each worktree (in alphabetical order):
a. Get its branch name from . b. Run
git worktree list. c. If conflicts arise, analyze and resolve them, preferring to combine both sides when possible. d. After successful merge, rungit merge <branch> --no-editandgit worktree remove <path>.git branch -d <branch> - Verify final state with and
git status.git log --oneline -n 10
{{INPUT}}
- 运行识别
git worktree list中的工作树。.trees/ - 对每个工作树(按字母顺序):
a. 从中获取其分支名称。 b. 运行
git worktree list。 c. 如果出现冲突,分析并解决冲突,尽可能优先合并双方内容。 d. 合并成功后,运行git merge <branch> --no-edit和git worktree remove <path>。git branch -d <branch> - 使用和
git status验证最终状态。git log --oneline -n 10
{{INPUT}}