Skip to main content

A lightweight CLI tool for managing git worktrees

Project description

git-wt

PyPI version

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 worktrees
  • hooks.post_create: List of scripts to run after creating a worktree

Why?

When working with git worktrees, you often need to:

  1. Copy environment files (.env, .envrc) to each new worktree
  2. Run setup scripts (install dependencies, etc.)

git-wt automates this workflow.

License

MIT

Project details


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.4.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

git_wt-0.1.4-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file git_wt-0.1.4.tar.gz.

File metadata

  • Download URL: git_wt-0.1.4.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for git_wt-0.1.4.tar.gz
Algorithm Hash digest
SHA256 efcd03d619175b90a56304895441c70f5bb8bc05a2a2f36647c7a5a15ac39b90
MD5 4ed8924e1195890e3d959c3a97f737b9
BLAKE2b-256 b40d7a0badcc80c2bd38613c96ce948f076f660fff4cdf0f076de9ecd7d1e27c

See more details on using hashes here.

File details

Details for the file git_wt-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: git_wt-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for git_wt-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0f94df49cbee0cf5196c1984cad70b4a1bfe85148d7f8d0262ce680e139fa1d3
MD5 48f7db4c37f161ad2399ac855c43dd7a
BLAKE2b-256 b9b2296f6dd2b348efdb248f3ed86eac9d749bb6b1fbe5142cceca75a0cc59b2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page