GitKat is a Rust CLI for bulk Git repository maintenance. It focuses on fast, repeatable workflows for identity cleanup, content redaction, and repository audits across many repos.
- Audit commit metadata across many repositories.
- Inventory author emails to plan identity rewrites.
- Force-push current branches in bulk.
- Rewrite history in-process with a Rust gitoxide (gix) engine.
- Rename paths and delete files across all history.
- Verify rewrite parity against
git-filter-repoand optionally BFG.
# crates.io
cargo install gitkat --locked
# Homebrew
brew tap Aureuma/gitkat
brew install gitkat
# pnpm
corepack pnpm install -g @aureuma/gitkat
# pipx (recommended)
pipx install gitkat
# pip
python -m pip install gitkatThe pip/pnpm wrappers download the Rust binary from GitHub Releases on first run.
# Inspect identities
gk check "Example Name"
gk report .
# Rewrite data in-place
gk rewrite -m olddomain.com:newdomain.com --ignore-case --preserve-case
# Discover GitHub contribution emails
gk github-emails --token YOUR_GITHUB_TOKENSearch for a name in author/committer fields across child repos.
gk check "Example Name"List unique author emails per repo, searching recursively from path.
gk report .Force-push the current branch and tags of each child repo to origin.
gk pushRewrite identity metadata and/or blob contents using the gitoxide engine.
Identity rewrite:
gk rewrite -n "New Name" -e "new@example.test" -o "old@example.test"Content rewrite (case-insensitive, case-preserving):
gk rewrite -m olddomain.com:newdomain.com --ignore-case --preserve-caseRegex mapping:
gk rewrite -m "token_[0-9]+:REDACTED" --regexRename file paths using the same mappings:
gk rewrite -m OldBrand:NewBrand --rename-filesDelete a path or glob across history:
gk rewrite --delete-path "path/to/file.txt"
gk rewrite --delete-path "assets/**/*.png"Use the GitHub API to find emails you have used in commits and PRs.
gk github-emails --token YOUR_GITHUB_TOKENCompare rewrite output against git-filter-repo, with optional blob-only checks against BFG.
gk verify-rewrite --ci --with-blobStream fast-export data out of a repo, or import a fast-import stream into a repo.
# Export to a file
gk fast-export --repo /path/to/repo --output export.fw
# Import from stdin
cat export.fw | gk fast-import --repo /path/to/new/repo- Audit identities: use
gk checkorgk reportto inventory names/emails. - Plan mappings: define
-m old:newmappings and any--delete-pathrules. - Rewrite: run
gk rewritefrom inside a repo or a parent directory of repos. - Verify: use
gk verify-rewritefor parity checks if needed. - Push: force-push rewritten history after inspection.
-m old:newreplaces literaloldwithnewin text blobs.- Escape literal colons with
\:(example:foo\:bar:baz). --regextreats the left side as a Rust regex.--ignore-caseand--preserve-casecontrol matching and replacement casing.--rename-filesapplies the same mappings to file paths.-xexcludes file globs from content and path rewriting.--delete-pathdeletes matching paths across all history (glob supported).
- Rewrites modify history. Use a clean working tree and coordinate with collaborators.
- After a rewrite, force-push branches and tags:
git push --force --tags origin mainGITKAT_RELEASE_BASE: override the GitHub Releases download base URL.GITKAT_CACHE_DIR: override the cache directory used by the pip wrapper.BFG_JAR: path to the BFG jar when runninggk verify-rewrite --with-bfg.
gh workflow run tests.yml
gh run watch --workflow tests.yml --exit-status
cargo run -p gitkat -- --helpMIT License. See LICENSE.