Create git worktrees for branches and switch to them. Useful for working with multiple LLM agents in parallel on different branches.
Creates a git worktree for the specified branch in ../<repo>-worktrees/<branch-name>, copies any paths listed in .worktreeinclude (one per line, # for comments), and opens a shell in the new worktree.
-
Symlink into your bin directory:
ln -s "$PWD/tree" ~/bin/tree
-
Make sure
~/binis in your PATH (add to.zshrcif needed):export PATH="$HOME/bin:$PATH"
tree <branch-name>