GitTwin
Run multiple git commits, branches, or tags of the same application side by side, each in its own isolated environment — for comparison, debugging, regression testing, and demonstrations.
Status: early / pre-alpha. The pipeline described below is the design target; the CLI is just getting started.
Why
Reproducing "it worked on commit X but not on commit Y" usually means stashing changes, checking out refs one at a time, and juggling ports, dependencies, and env files by hand. GitTwin is meant to make that a single command:
- Point it at a repo and a list of refs (commits, branches, or tags).
- It spins up an isolated environment — its own worktree, dependencies, and ports — for each ref.
- You run, compare, and debug them side by side, without one checkout clobbering another.
- Tear it all down in one command when you're done.
Install
uv add gittwin
pip install gittwin
Usage
gittwin about
gittwin --version
gittwin doctor # checks git and uv are installed and on PATH
gittwin list # lists worktrees gittwin has created in the current repo
How worktrees work
gittwin checks out each ref you want to run into its own git
worktree — a separate working
directory sharing the same .git history, so multiple refs can be checked
out side by side without one clobbering another or disturbing your current
branch.
- Worktrees are created under
<repo>/.gittwin/worktrees/<ref>by default. gittwin listshows only worktrees gittwin created — your main checkout is never listed as one of them.- Any ref shape works — commit SHA, branch name, or tag — and an invalid ref fails immediately with a clear error instead of a raw git traceback.
- If setup for a ref fails partway through, gittwin removes that worktree again rather than leaving a half-provisioned one behind.
This is the foundation gittwin run/gittwin compare (coming soon) will
build on: an isolated environment, dependencies, and a port per worktree.
Development
This project uses uv for dependency management.
uv sync --extra dev # install package + dev deps into .venv
uv run pytest -q # run tests
uv run gittwin about # run the CLI
Metadata
Release files for gittwin 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gittwin-0.1.1.tar.gz | 11.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gittwin-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.7 kB
Release files / gittwin-0.1.1.tar.gz
| Download URL | gittwin-0.1.1.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2babed460e52352be005ddd3a7c71d15b808c80befa94cf11ea4753afd50c54e
|
|
BLAKE2b-256 checksum How to use checksums |
1ec2bb74df46aba363f2e08705d9eb4353a6035418cd602e448b774b6a1da808
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / gittwin-0.1.1-py3-none-any.whl
| Download URL | gittwin-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
41ae1126ee32633e1f17336bd8d77616a96557a5c0c79ebd983f7edaa56b74c9
|
|
BLAKE2b-256 checksum How to use checksums |
7b815fa7b858051b920bb48588fb88df7d86bc07ed7d1afb798cc8beb9dba2a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|