Git & Ship — Quản lý code và deploy
Quản lý git workflow, tạo worktree cho parallel development, và ship code lên production.Cú pháp
Bảng tham chiếu nhanh
| Lệnh | Mô tả | Use case |
|---|---|---|
/git | Staging, committing, pushing, PRs, merges | Daily git operations |
/worktree | Tạo git worktree riêng biệt | Parallel development trong monorepo |
/ship | Full ship pipeline (merge, test, review, push, PR) | Ship feature lên production |
/git — Git operations
Hỗ trợ conventional commits tự động:/worktree — Parallel development
Cho phép chạy nhiều session Claude Code song song trên các bản sao riêng biệt của repo. Mỗi worktree có folder + branch riêng, không đụng nhau.Cách dùng
- Từ terminal
- Trong session Claude Code
- Cho subagent (Agent tool)
Lifecycle
- Không có thay đổi → worktree + branch tự xóa khi thoát
- Có thay đổi → Claude hỏi giữ lại hay xóa
File .worktreeinclude
Tạo ở root project, liệt kê file gitignored muốn copy vào worktree:
Use case cho project
Best practices:
- Đặt tên worktree theo branch convention:
feat-*,fix-*,hotfix-* - Tạo
.worktreeincludenếu project dùng.env - Dùng worktree khi cần chạy 2+ tasks song song trên cùng repo
- Không dùng worktree cho task nhỏ chỉ cần 1 session
/ship — Ship pipeline
Full pipeline từ feature branch đến production:Branch naming convention
Khi nào dùng / không dùng
| Dùng | Không dùng |
|---|---|
Ship feature hoàn chỉnh (/ship) | Chỉ commit nhỏ (dùng git CLI trực tiếp) |
Parallel dev trên nhiều features (--worktree) | Single branch workflow, task nhỏ 1 session |
Cần conventional commits tự động (/git) | Khi muốn manual git control |