Working with git worktree can be a bit finicky at time.
git-twig aims to make worktrees a first class citizens,
similar to branches.
Using it's shell integration, git-twig makes switching between worktrees
as easy as git twig switch ....
- Python >= 3.10
# installation with pipx
pipx install git+https://github.com/Bubichoo-Teitichoo/git-twig
# installation with uv
uv tool install git+https://github.com/Bubichoo-Teitichoo/git-twigsee CLI reference
git-twig has supports for the following shells:
- powershell/pwsh
- zsh
- bash
Note
The git-twig init command is able to detect your current shell.
If this detection, for whatever reason, is not working,
add the name of your shell as and additional argument
e.g. git-twig zsh.
To add shell completion and integration to zsh, add the following line to you .zshrc.
eval "$(git-twig init)"To add shell completion and integration to bash, add the following line to you .bashrc.
eval "$(git-twig init)"To add shell completion and integration to powershell,
add the following line to you $PROFILE.
@(& git-twig init) -join "`n" | Invoke-Expression