wt-finish

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

/wt:finish - Finish Feature and Merge

/wt:finish - 完成功能并合并

Description

描述

Quick command to finish a feature, merge it back to the base branch, and clean up the worktree.
用于完成功能开发的快捷命令,可将功能分支合并回基础分支并清理工作树。

Usage

使用方法

/wt:finish
/wt:finish

What It Does

功能说明

This slash command:
  1. Activates the Git Worktree Manager skill (
    @git-worktree
    )
  2. Automatically runs the
    *finish-feature
    command
  3. Guides you through merging and cleanup
这个斜杠命令会:
  1. 激活Git Worktree Manager skill(
    @git-worktree
  2. 自动运行
    *finish-feature
    命令
  3. 引导你完成合并和清理全流程

Workflow

工作流程

The command will:
  1. Verify clean state - Ensure all changes are committed
  2. Ask for base branch - Which branch to merge into (e.g.,
    main
    )
  3. Run tests - Optional: run tests before merging
  4. Checkout base branch - Switch to the target branch
  5. Merge feature - Merge your feature branch
  6. Push changes - Push the merged changes
  7. Remove worktree - Clean up the feature worktree
  8. Delete branch - Optionally delete the feature branch
该命令将执行以下步骤:
  1. 验证状态干净 - 确保所有更改都已提交
  2. 询问基础分支 - 要合并到的目标分支(例如
    main
  3. 运行测试 - 可选:合并前运行测试
  4. 检出基础分支 - 切换到目标分支
  5. 合并功能分支 - 合并你的功能分支
  6. 推送更改 - 推送合并后的更改
  7. 移除工作树 - 清理该功能对应的工作树
  8. 删除分支 - 可选删除功能分支

Benefits

优势

Complete Workflow - Handles entire merge process ✅ Safe Merging - Verifies tests and clean state ✅ Automatic Cleanup - Removes worktree and branch ✅ Guided Process - Interactive prompts for all steps
完整工作流 - 覆盖整个合并流程 ✅ 安全合并 - 验证测试通过与工作区状态干净 ✅ 自动清理 - 自动移除工作树和分支 ✅ 引导式流程 - 所有步骤均提供交互式提示

Notes

注意事项

  • Ensures all changes are committed before merging
  • Optionally runs tests before merging
  • Cleans up both worktree and branch
  • Returns you to the base branch
  • 合并前会校验所有更改都已提交
  • 支持合并前可选运行测试
  • 会同时清理工作树和对应分支
  • 执行完成后自动切换回基础分支