Skip to main content

git-cl

A pre-staging layer for organising changes in Git

Tutorial DOI PyPI Tests

Git Changelists

git-cl is a command-line tool that brings changelist support to Git, inspired by Subversion. It adds a pre-staging review layer that lets you organise modified files into named groups before staging or committing. Changelists can be stashed selectively and promoted to dedicated branches — enabling a late-binding branching workflow where the branch decision follows the code, not the other way around.

Features

Workflow

  • Pre-staging review: group changed files by intent before staging
  • Organise multiple concerns on a single branch
  • Stage and commit changes by intent
  • Stash changelists and resume work later
  • Late-binding branching: promote a changelist to a dedicated branch

Scope: operates at file level — patch-level editing is left to other Git tools.

Technical

  • Local-only metadata (.git/cl.json, .git/cl-stashes.json)
  • Simple CLI: git cl <command>

Demo

git-cl demo: creating changelists, viewing status, and branching

Quick Start

Install via pipx

pipx install git-changelists

The PyPI package is named git-changelists to avoid namespace conflicts; it installs the git-cl command. pip install git-changelists works too, for example in a virtual environment.

Install via curl

mkdir -p ~/bin
curl -fsSL https://raw.githubusercontent.com/BHFock/git-cl/main/git-cl -o ~/bin/git-cl
chmod +x ~/bin/git-cl

Make sure ~/bin is listed in your $PATH.

This downloads the current state of main, which can include changes that are not released yet. For a released version, replace main in the URL with a tag from the releases page, for example 1.9.0.

Verify installation

git cl --version
git cl help

Optional: prune automatically after every commit

Files committed with plain git commit stay in their changelist. With Git 2.54 or later, this hook removes them after every commit, in all your repositories:

git config --global hook.git-cl-prune.event post-commit
git config --global hook.git-cl-prune.command "git cl prune --quiet"

For older Git versions and how to turn the hook off, see the tutorial.

Use changelists inside a Git repository

git cl add fixup file1.py
git cl status
git cl commit fixup -m "Fix file1"

Common Commands

# Add files to a changelist
git cl add docs-fix README.md docs/index.md

# See changes grouped by changelist
git cl status

# Stage or commit changelists
git cl stage docs-fix
git cl commit docs-fix -m "Update documentation layout and intro"

# Keep the changelist after committing
git cl commit docs-fix -m "Fix bug" --keep

# Remove a file from its changelist
git cl remove README.md

# Rename a changelist, or merge it into an existing one
git cl mv docs-fix docs

# Delete a changelist
git cl delete docs-fix

# Remove files without changes from all changelists
git cl prune

# Set a changelist aside and restore it later
git cl stash docs-fix
git cl unstash docs-fix

# Late-binding branching: create a branch from a changelist (auto-stash/unstash)
git cl br docs-fix

Documentation

📘 Tutorial: Guide with examples and FAQ

📘 Lesson: 30-minute hands-on lesson with slides and exercises

📘 Design Notes: Technical architecture

📘 Tests: Test suite and shell walkthroughs

📘 Why git-cl exists: History and motivation

📘 Paper: Design, workflow, and related work

Ecosystem

git-cl is CLI-only by design. Its stable metadata files and command interface allow editors and other tools to build on it. The metadata compatibility rules describe the file format, what may change between releases, and the format history.

Further independently maintained integrations are welcome, see integration guidance.

git-cl was mentioned in Git Rev News Edition #140.

Notes

  • Requires Python 3.9+ and Git 2.23 or later
  • Coloured git cl status output needs the optional colorama package (pip install colorama, or pipx inject git-changelists colorama after a pipx installation); without it, output is plain text
  • Local-only; designed for single-user workflows
  • Tested by CI on Linux (Python 3.9 and 3.15) and Windows (Python 3.15), and by hand on macOS (system Python 3.9 and Apple Git)
  • Changes in each version are listed in the release notes
  • Always inspect downloaded scripts before executing, see source
  • For security concerns, see SECURITY

License

BSD 3-Clause, see LICENSE | CONTRIBUTING.

Metadata

Release files for git-changelists 1.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for git-changelists 1.9.0
File Size Uploaded Provenance Actions
git_changelists-1.9.0.tar.gz 105.7 kB With provenance Details for git_changelists-1.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for git-changelists 1.9.0
File Interpreter ABI Platform Actions
git_changelists-1.9.0-py3-none-any.whl Python 3 none any Details for git_changelists-1.9.0-py3-none-any.whl

Total release size: 159.5 kB

Release files / git_changelists-1.9.0.tar.gz

Download URL git_changelists-1.9.0.tar.gz
Size 105.7 kB
Tags Source
SHA-256 checksum
How to use checksums
438e63d7aec04ccef96b1ee07c8bfec13695179006a2848904e384f5d9e1b319
BLAKE2b-256 checksum
How to use checksums
84e5691859307cf23b8942517d212bee1e0ff2c1bae14b29f283e73d04bf315f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / git_changelists-1.9.0-py3-none-any.whl

Download URL git_changelists-1.9.0-py3-none-any.whl
Size 53.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d6442a1f681c90cbd8c47ee41c000faf2405219a7edce8b2eb5432c1c746c9f8
BLAKE2b-256 checksum
How to use checksums
b89c273628052f38456e0d4b62952e253b5578a5a59e286cdc96647b31059ac5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for git-changelists 1.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for git_changelists-1.9.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.9.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page