An interactive Git worktree manager powered by fzf. Create, switch, and clean up worktrees without remembering any git worktree commands.
cargo install fzf-worktree
worktree aliasAdd the printed alias to your shell config (~/.bashrc, ~/.zshrc, etc.):
wt() { cd "$(worktree "$@")"; }git clone https://github.com/brucemacd/wt.git
cd wt
cargo build --release
cp target/release/worktree ~/.local/bin/| Command | Description |
|---|---|
wt |
Open interactive picker — select an existing worktree or type a new branch name |
wt new <name> |
Create or switch to a worktree by name |
wt exit |
Return to the main repo directory |
wt remove <name> |
Delete a worktree (alias: wt rm) |
wt prefix "feature/" |
Set a prefix applied to all new branch names |
wt prefix |
Show the current prefix |
wt prefix "" |
Clear the prefix |
- Run
wtinside any Git repo - An fzf picker shows your existing worktrees
- Select one to switch, or type a new branch name and press Enter
- New worktrees are created at
~/.wt/<repo>/<branch>/
# Start a feature
wt # type "feature-xyz", press Enter
# ... write code ...
git push -u origin feature-xyz
gh pr create
# Switch context
wt # pick another worktree
# Cleanup after merge
wt exit
wt remove feature-xyz# Build and install locally
cargo install --path .
# Build without installing (binary at target/debug/worktree)
cargo build
# Run directly without installing
cargo run -- [command]After rebuilding, run cargo install --path . to update the installed binary.
