Git Worktree CLI (gwt)
Tooling around git worktrees to make managing multiple branches easier
Work on multiple branches simultaneously without stashing or switching. Never lose context switching between features. One repository, multiple working directories:
Each directory is independent. cd to switch between branches.
Installation
&&
Daily Workflow
# Setup once per project
# Create branches instantly
# Switch contexts with cd (no stashing)
# See all work with PR status
# ┌───────────────────┬─────────────────────────────┐
# │ BRANCH │ PULL REQUEST │
# │ main │ - │
# │ feature/user-auth │ #42 (open) │
# │ hotfix/login-bug │ #41 (merged) │
# └───────────────────┴─────────────────────────────┘
# Clean up finished work
Commands
gwt init <url>- Setup project from repositorygwt add <branch>- Create branch directorygwt list- Show branches with PR statusgwt remove [branch]- Delete branch directorygwt auth <provider>- Setup GitHub/Bitbucket auth
Automation
Auto-run commands when creating/removing branches. Edit git-worktree-config.jsonc:
Now gwt add feature/x automatically installs dependencies.
PR Integration
Setup once to see PR status in gwt list:
GitHub: gh auth login
Bitbucket: gwt auth bitbucket-cloud setup
Works with GitHub, Bitbucket Cloud, and Bitbucket Data Center.
Why This Makes Work Easier
- No stashing - Switch branches instantly with
cd - No losing context - Each branch keeps its state
- Parallel work - Handle urgent fixes without disrupting features
- Automated setup - Dependencies install automatically via hooks
- PR visibility - See all pull requests from terminal
Requirements
- Git 2.5+
- Rust 1.70+ (for building)
MIT License • Contributions welcome