在 Manus 中运行任何 Skill
一键导入
一键导入
一键在 Manus 中运行任何 Skill
开始使用$pwd:
git-worktree
// Manage Git worktrees for isolated parallel development without branch switching
$ git log --oneline --stat
stars:3
forks:0
updated:2026年1月13日 06:42
SKILL.md
// Manage Git worktrees for isolated parallel development without branch switching
| name | git-worktree |
| description | Manage Git worktrees for isolated parallel development without branch switching |
Manage isolated development environments using Git worktrees.
git worktree add ../feature-xyz -b feature/xyz
git worktree add ../pr-review origin/pr-branch
git worktree list
git worktree remove ../feature-xyz
git worktree prune
# Create isolated workspace for new feature
git worktree add ../my-feature -b feature/new-thing
# Work in the new worktree
cd ../my-feature
# When done, merge and cleanup
git checkout main
git merge feature/new-thing
git worktree remove ../my-feature
git branch -d feature/new-thing
# Create worktree for PR review without switching branches
git fetch origin pull/123/head:pr-123
git worktree add ../pr-123-review pr-123
# Review in separate directory
cd ../pr-123-review
go test ./...
# Cleanup after review
git worktree remove ../pr-123-review
git branch -D pr-123
# You're working on feature, need to fix prod bug
git worktree add ../hotfix -b hotfix/urgent-fix origin/main
# Fix bug in hotfix worktree
cd ../hotfix
# ... make fixes ...
git commit -am "fix: urgent bug"
git push origin hotfix/urgent-fix
# Return to feature work
cd ../my-feature
~/code/
├── celestia-app/ # Main worktree (main branch)
├── celestia-app-feature/ # Feature worktree
├── celestia-app-hotfix/ # Hotfix worktree
└── celestia-app-review/ # PR review worktree
git worktree prune periodicallyThe branch is already checked out in another worktree. Use a different branch or remove the existing worktree.
Run git worktree prune to clean up references to deleted worktree directories.
Run git submodule update --init in the new worktree.