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-merge
.
When the original command text references
{{INPUT}}
,
$1
, or named arguments, map them from the user's current request.
用于Claude命令
/worktree-merge
的Agent技能封装。
当原始命令文本引用
{{INPUT}}
$1
或命名参数时,从用户当前请求中映射这些参数。

Command Instructions

命令说明

Merge all git worktrees under the
.trees/
directory into the current branch.
.trees/
目录下的所有git工作树合并到当前分支。

Steps

步骤

  1. Run
    git worktree list
    to identify worktrees in
    .trees/
    .
  2. For each worktree (in alphabetical order): a. Get its branch name from
    git worktree list
    . b. Run
    git merge <branch> --no-edit
    . c. If conflicts arise, analyze and resolve them, preferring to combine both sides when possible. d. After successful merge, run
    git worktree remove <path>
    and
    git branch -d <branch>
    .
  3. Verify final state with
    git status
    and
    git log --oneline -n 10
    .
{{INPUT}}
  1. 运行
    git worktree list
    识别
    .trees/
    中的工作树。
  2. 对每个工作树(按字母顺序): a. 从
    git worktree list
    中获取其分支名称。 b. 运行
    git merge <branch> --no-edit
    。 c. 如果出现冲突,分析并解决冲突,尽可能优先合并双方内容。 d. 合并成功后,运行
    git worktree remove <path>
    git branch -d <branch>
  3. 使用
    git status
    git log --oneline -n 10
    验证最终状态。
{{INPUT}}