https://github.com/guywaldman/wt
CLI for sane work with git worktrees
https://github.com/guywaldman/wt
cli git
Last synced: 2 days ago
JSON representation
CLI for sane work with git worktrees
- Host: GitHub
- URL: https://github.com/guywaldman/wt
- Owner: guywaldman
- Created: 2026-05-31T16:11:17.000Z (28 days ago)
- Default Branch: main
- Last Pushed: 2026-06-11T15:39:51.000Z (17 days ago)
- Last Synced: 2026-06-11T17:16:12.270Z (17 days ago)
- Topics: cli, git
- Language: Rust
- Homepage:
- Size: 96.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# wt
Small git worktree helper CLI, focused on ergonomics.
> [!WARNING]
>
> This CLI, while lightweight, is not battle-tested.
> It should not have any destructive behavior, but be sure to commit or stash changes before using it just in case.
---
## Installation
```sh
# Homebrew
brew install guywaldman/tap/wt
# From source
cargo install --git https://github.com/guywaldman/wt --locked
```
## Shell setup
```sh
# zsh
echo 'eval "$(wt init zsh)"' >> ~/.zshrc
# bash
echo 'eval "$(wt init bash)"' >> ~/.bashrc
# fish
echo 'wt init fish | source' >> ~/.config/fish/config.fish
```
This enables completions and makes `wt switch` change the current shell's cwd.
## Commands
Relative `[path]` arguments are resolved from the worktree root, not the current worktree.
```sh
# Lists all worktrees as ``.
wt list
# Creates a worktree for `branch`. If the branch does not exist, it is created from the current `HEAD`.
wt add [path]
# Switches cwd to `branch`'s worktree. Creates it first if it does not exist.
wt switch [path]
# Copies current changes into `branch`'s worktree. Copies unstaged changes by default; `--staged` copies staged changes and stages them in the target worktree.
wt fork [path] [--staged] [-- ...]
# Removes the linked worktree for `branch`. Refuses dirty worktrees unless `--force` is passed.
wt remove [--force]
```