Loading...
Loading...
Create git worktrees in .worktrees/ for working on different branches without touching current working directory. Use this when the user needs to switch to another branch for quick fixes or temporary work while preserving uncommitted changes in their current worktree.
npx skill4agent add alex-popov-tech/.dotfiles git-worktree-create.worktrees/.worktrees/<branch-name>scripts/create_worktree.sh/-git fetch --allorigin.worktrees/.worktrees/<sanitized-branch-name>scripts/create_worktree.sh <branch-name><branch-name># Create worktree for a local branch
scripts/create_worktree.sh feature/new-feature
# Create worktree for a remote branch
scripts/create_worktree.sh hotfix/urgent-fix
# Branch names with slashes are automatically sanitized
# Branch: user.name/AOF-123 → Worktree: .worktrees/user.name-AOF-123
scripts/create_worktree.sh user.name/AOF-123.worktrees/<branch-name>.worktrees/repo-root/
├── .worktrees/
│ ├── feature-branch/ # Worktree for feature-branch
│ ├── hotfix-123/ # Worktree for hotfix-123
│ ├── user.name-AOF-456/ # Worktree for user.name/AOF-456 (sanitized)
│ └── bugfix-fix-critical-issue/ # Worktree for bugfix/fix-critical-issue (sanitized)
├── .git/
└── [main working directory files]/-