Loading...
Loading...
Create a new git branch and worktree at ../{repo}.worktrees/{slug}. Use when the user wants to start isolated work on a new branch without switching the main checkout. Invoke as /worktree <branch-name>.
npx skill4agent add bmthd/skills worktreeargs# Get the repository root
git rev-parse --show-toplevel
# Get the repository name (directory name)
basename "$(git rev-parse --show-toplevel)"/-:-feature/add-buttonfeature-add-button{repo_root}/../{repo_name}.worktrees/{slug}/home/user/my-project/home/user/my-project.worktrees/feature-add-button# Check if branch exists locally
git branch --list "{branch_name}"
# Check if branch exists on remote
git ls-remote --heads origin "{branch_name}"| Local | Remote | Command |
|---|---|---|
| No | No | |
| No | Yes | |
| Yes | - | |
-bgit fetch--track -b-bgit worktree addrm -rfbasename $(git rev-parse --show-toplevel)git worktree addgit ls-remote