Interactive TUI for git worktree management.
brew tap nsheaps/devsetup
brew install git-wt
# Clone and add to PATH
git clone https://github.com/nsheaps/git-wt.git
export PATH="$PATH:$(pwd)/git-wt/bin"
git-wt [OPTIONS] [BRANCH]
| Argument |
Description |
BRANCH |
Branch name to create/switch to worktree for (skips selection) |
| Option |
Description |
--scan-dir DIR |
Directory to scan for git repos (default: ~/src) |
-h, --help |
Show help message |
-v, --version |
Show version |
# Interactive mode - select from branches
git-wt
# Direct branch switch - find or create worktree for branch
git-wt feature/my-branch
# Scan a different directory for repos
git-wt --scan-dir ~/projects
- Direct branch argument: Pass a branch name to skip interactive selection
- Smart branch detection: Finds local, remote, or creates new branches
- Repo discovery: When not in a git repo, scans
~/src for existing repos
- "Switch repository" option: Step up to change repos during selection
- Shows banner if already in a worktree
- Create new worktrees with new branches
- Select from existing worktrees
- Worktrees created at:
../${repo}.worktrees/${branch}
| Tool |
Purpose |
Installation |
gum |
Interactive prompts |
brew install gum |
git |
Version control |
Usually pre-installed |
MIT