βββββ
ββ βββββββ
ββ ββ ββ ββ βββββββ βββ
ββ ββ ββ ββ ββ ββ ββββ
ββββββββ ββ ββ ββ ββ
βββ βββ ββββββββ βββββ ββ
ββ ββ ββββ ββ ββββ ββ
Gitβs native worktree commands feel tedious and geared toward long-lived worktrees, but I just spin them up for short-lived sessions. wut? streamlines that.
wut? keeps worktrees in the .worktrees folder (auto-ignored by Git) inside the repo and exposes commands like wut new, wut go, wut list, and wut rm to manage them.
It still builds directly on Gitβs worktrees, so it plays nicely with any other Git CLI or UI. Very opinionated and very much designed for the β¨agentic eraβ¨, unlike the built-in commands that are super tedious.
Install wut? using Homebrew as shown below.
brew tap simonbs/wut https://github.com/simonbs/wut.git
brew install wutYou'll need Git on your machine. After installation, add shell integration to your ~/.zshrc or ~/.bashrc:
eval "$(wut init)"This enables automatic directory changing when you run wut new or wut go. Without it, these commands will prompt you to set up shell integration.
Run wut from inside the repo you want worktrees for.
$ wut new feature-login
# Creates worktree and switches to it
$ wut list
π feature-login ~/projects/myapp/.worktrees/feature-login
π main ~/projects/myapp
$ wut go
# Switches to main worktree
$ wut rm feature-login
# Removes worktree and deletes branchwun will automatically create a .worktrees/ folder in the root of the repository. .worktrees/ folders will automatically be added to your global .gitignore file.
wut new <branch> [--from ref] # Create a new worktree
wut list # List worktrees
wut go [branch] # Navigate to a worktree
wut path <branch> # Print worktree path
wut rm <branch> [--force] # Remove a worktreeAutocompletion is available for supported shells once you run eval "$(wut init)", so you can tab-complete commands, branch names, and worktree names.
$ wut go feat<TAB>
# Completes to a matching worktree namewut works great paired with fzf for fuzzy matching worktrees and wut list can be paired with fzf as shown below (Thanks @carlosefonesca!)
alias wt='cd "$(wut list | fzf --height=~20 | awk "{print \$3}" | sed "s|^~|$HOME|")"'