Enhanced Git worktree management with interactive features
A Git custom command that enhances Git’s native worktree functionality with interactive features, automation, and repository migration capabilities.
git-wt uses a bare repository structure where the git data lives in a .bare directory and each branch gets its own worktree directory.
Git worktrees allow you to have multiple branches checked out simultaneously in different directories:
.bare/, each branch in its own directoryHomebrew:
brew tap ahmedelgabri/git-wt
brew install git-wt
Nix Flakes:
nix run github:ahmedelgabri/git-wt
Manual:
Download a prebuilt binary from the releases page:
curl -sL https://github.com/ahmedelgabri/git-wt/releases/latest/download/git-wt-VERSION-OS-ARCH.tar.gz | tar xz
cp git-wt-VERSION-OS-ARCH/git-wt ~/.local/bin/
# Clone with worktree structure
git wt clone https://github.com/user/repo.git
# Migrate existing repo (experimental)
git wt migrate
# Create new worktree (interactive)
git wt add
# Switch between worktrees
cd $(git wt switch)
# Remove worktree
git wt remove feature-branch
When you clone with git wt clone, you get:
repo/
├── .bare/ # Git data (bare repository)
├── .git # Points to .bare
└── main/ # Worktree for default branch
| Command | Description |
|---|---|
clone <url> |
Clone repo with worktree structure |
migrate |
Convert existing repo to worktree structure (experimental) |
add [options] ... |
Create new worktree (supports all git worktree flags) |
remove [worktree] |
Remove worktree and local branch |
destroy [worktree] |
Remove worktree and delete local + remote branches |
update |
Fetch all and update default branch |
switch |
Interactive worktree selection |
All native git worktree commands (list, lock, unlock, move, prune, repair) are also supported as pass-through.
git (2.48.0+ for relative worktree support)