跳到正文
FunCoding

wt

Create a git worktree in worktree/ subdirectory with up-to-date master

Star
5,060
许可证
MIT
最近提交
2026年10月14日

.claude/skills/wt/SKILL.md

在 GitHub 上查看

Create Git Worktree

Create a new worktree in worktree/<branch-name> with branch <branch-name>.

Execution

# Return to repo root
cd "$(git rev-parse --show-toplevel)"

# Pull latest master
git checkout master
git pull origin master

# Create worktree
git worktree add worktree/"$ARGUMENTS" -b "$ARGUMENTS"

# Initialize submodules (skills-vendor)
git -C worktree/"$ARGUMENTS" submodule update --init --recursive

# Navigate to worktree
cd worktree/"$ARGUMENTS"

# Confirm location and branch
echo ""
echo "✅ Worktree created and ready:"
echo "   Location: $(pwd)"
echo "   Branch: $(git rev-parse --abbrev-ref HEAD)"
echo ""
echo "You can now work in this isolated environment."

Notes

  • Worktree inherits .claude/skills/ workflows
  • To remove when done: cd ../.. && git worktree remove worktree/"$ARGUMENTS"
  • List all worktrees: git worktree list

相似的 Skill

verification-before-completion

OBobra/superpowers299k近 7 天新增 2,675 个 star

finishing-a-development-branch

OBobra/superpowers299k近 7 天新增 2,675 个 star

using-git-worktrees

OBobra/superpowers299k近 7 天新增 2,675 个 star

pr

MAmattpocock/skills290k近 7 天新增 10,235 个 star

triage

MAmattpocock/skills290k近 7 天新增 10,235 个 star

wizard

MAmattpocock/skills290k近 7 天新增 10,235 个 star