git-wt
A lightweight CLI tool for managing git worktrees with automatic file syncing and post-create hooks.
Install
uv tool install git-wt
# or
pipx install git-wt
# or
pip install git-wt
Usage
cd your-repo
git wt # as a git subcommand
# or
git-wt # standalone
On first run, you'll be prompted to create a config file.
Features
- Create worktrees with branch autocomplete
- Auto-copy or symlink configured files (.env, .envrc, etc.)
- Run post-create hooks (setup scripts)
- List worktrees with dirty status
- Remove worktrees with safety prompts
- Path copied to clipboard on creation
Config
On first run, git-wt will prompt you to create .git-wt.toml in your repo root:
[files]
mode = "copy" # or "symlink"
paths = [".env", ".envrc"]
[hooks]
post_create = ["./setup.sh"]
Options
files.mode:"copy"(default) or"symlink"files.paths: List of files/directories to sync to new worktreeshooks.post_create: List of scripts to run after creating a worktree
Why?
When working with git worktrees, you often need to:
- Copy environment files (.env, .envrc) to each new worktree
- Run setup scripts (install dependencies, etc.)
git-wt automates this workflow.
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
git_wt-0.1.8.tar.gz
(15.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file git_wt-0.1.8.tar.gz.
File metadata
- Download URL: git_wt-0.1.8.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
288956638353e294189d3ed258645ef886ef00edbc37c5f51a964ade859cfb7b
|
|
| MD5 |
ea3327a687d76840718f9a661100b3d2
|
|
| BLAKE2b-256 |
185935cb19fa4390ade8b11c7d901fc3bac2e4e4fc2f53655ec54a8071881e1c
|
File details
Details for the file git_wt-0.1.8-py3-none-any.whl.
File metadata
- Download URL: git_wt-0.1.8-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a10069d16cd490443f3850d23985c504520419e9a259ce1a8e82b7bae1b3d4b0
|
|
| MD5 |
60eaa5d339d0b671467d0c4627c27cd4
|
|
| BLAKE2b-256 |
1b1f267fccebbe48c50e0ca128ac049edc5cee9fbd0780d0e8754c326b04f50b
|