A Git Worktree Manager using gum for beautiful interactive CLI prompts.
Inspired by gko/gwt but built with charmbracelet/gum instead of fzf.
- Interactive Navigation — Select worktrees from a filterable menu
- Quick Add — Create new worktrees with interactive branch selection
- Easy Removal — Remove worktrees interactively with confirmation
- Direct Access — Jump to specific branch worktrees by name
- Main Branch Shortcut — Navigate directly to main/master worktree
- gum — Install with
brew install gumor see gum installation docs - git with worktree support
Clone the repository and source the script in your shell configuration:
# Clone
git clone https://github.com/gnguyo/gwt.git ~/.gwt
# Add to ~/.bashrc or ~/.zshrc
source ~/.gwt/gwt.shOr download just the script:
curl -o ~/.gwt.sh https://raw.githubusercontent.com/gnguyo/gwt/main/gwt.sh
echo 'source ~/.gwt.sh' >> ~/.bashrcgwt # Interactive worktree selection
gwt add [branch] # Create and switch to new worktree
gwt main # Jump to main branch worktree
gwt master # Jump to master branch worktree
gwt <branch> # Jump to specific branch worktree
gwt remove [-f|--force] # Remove worktrees interactively
gwt --help # Display help
# Pick from existing worktrees
gwt
# Create worktree with interactive branch picker
gwt add
# Create worktree for a specific branch
gwt add feature/login
# Filter branches starting with "feat"
gwt add feat
# Jump to main branch worktree
gwt main
# Remove a worktree interactively
gwt remove
# Force remove a worktree
gwt remove -f- Worktrees are created alongside the main repository with a hash suffix
- e.g.,
/var/www/my-project→/var/www/my-project-bace48f
- e.g.,
- The hash is derived from the branch name for consistency
- If a path already exists, a new unique hash is generated
- Main/master branches cannot be added as worktrees (use
gwt mainto navigate)
GPL-3.0
- Inspired by gko/gwt
- Built with charmbracelet/gum