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:finishWhat It Does
功能说明
This slash command:
- Activates the Git Worktree Manager skill ()
@git-worktree - Automatically runs the command
*finish-feature - Guides you through merging and cleanup
这个斜杠命令会:
- 激活Git Worktree Manager skill()
@git-worktree - 自动运行命令
*finish-feature - 引导你完成合并和清理全流程
Workflow
工作流程
The command will:
- Verify clean state - Ensure all changes are committed
- Ask for base branch - Which branch to merge into (e.g., )
main - Run tests - Optional: run tests before merging
- Checkout base branch - Switch to the target branch
- Merge feature - Merge your feature branch
- Push changes - Push the merged changes
- Remove worktree - Clean up the feature worktree
- Delete branch - Optionally delete the feature branch
该命令将执行以下步骤:
- 验证状态干净 - 确保所有更改都已提交
- 询问基础分支 - 要合并到的目标分支(例如)
main - 运行测试 - 可选:合并前运行测试
- 检出基础分支 - 切换到目标分支
- 合并功能分支 - 合并你的功能分支
- 推送更改 - 推送合并后的更改
- 移除工作树 - 清理该功能对应的工作树
- 删除分支 - 可选删除功能分支
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
- 合并前会校验所有更改都已提交
- 支持合并前可选运行测试
- 会同时清理工作树和对应分支
- 执行完成后自动切换回基础分支