βββββ
ββ βββββββ
ββ ββ ββ ββ βββββββ βββ
ββ ββ ββ ββ ββ ββ ββββ
ββββββββ ββ ββ ββ ββ
βββ βββ ββββββββ βββββ ββ
ββ ββ ββββ ββ ββββ ββ
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 ~/.wut/repos/ 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
# Creates worktree with a random name (e.g. wiggly-yellowtail-2026-02-24) and switches to it
$ wut new feature-login
# Creates worktree with explicit name and switches to it
$ wut mv feature-login
# Renames current worktree's branch and moves directory
$ wut list
π feature-login ~/.wut/repos/myapp/feature-login
π main ~/projects/myapp
$ wut go
# Switches to main worktree
$ wut rm feature-login
# Removes worktree and deletes branchBy default, wut stores managed worktrees outside the repo. Configure location behavior with:
| Environment Variable | Git Config | Purpose | Default |
|---|---|---|---|
WUT_WORKTREES_DIR |
wut.worktreesDir |
Exact worktrees directory for this repo/session. | Unset |
WUT_WORKTREES_BASE_DIR |
wut.worktreesBaseDir (global) |
Base directory where repo folders are created. | ~/.wut/repos |
WUT_WORKTREES_INCLUDE_REPO_HASH |
wut.includeRepoHash |
Append a stable hash as <repo>-<hash> to reduce name collisions. |
false |
Set WUT_WORKTREES_INCLUDE_REPO_HASH=true (or git config wut.includeRepoHash true) when you work with multiple repos that share a name (for example api).
If a repo already has a legacy .worktrees/ directory, wut will keep using it for backwards compatibility.
wut new [branch] [--from ref] # Create a new worktree (random name if omitted)
wut mv [old] <new-name> # Rename a worktree's branch
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, worktree names, and wut new --from refs.
$ wut go feat<TAB>
# Completes to a matching worktree name
$ wut new cr --from feat<TAB>
# Completes to a matching local or remote branch refwut 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|")"'