On this page
gitwriter
Prev: parsethon | Up: projects | Next: shimify
Rel: wispsy, Tooling & Runtimes, gitdx
Ref: wispsy on GitHub
Tags: #public #wispsy #project #tooling #tier/specialized
Role
Safe, metadata-only Git history rewriting (0.1.0, Python 3.10+, zero runtime deps)—rewriting author, committer, or commit messages via git subprocess without touching trees or parent/merge structure, with expected-old-value checks and refs/gitwriter/backup/<ref> safety backups.
Install
python -m pip install gitwriter
Quickstart
from gitwriter import GitWriter, ProposedEdit, RewritePlan
w = GitWriter(".")
root = w.snapshot("main").root
plan = RewritePlan(root, [
ProposedEdit(commit, "author", "New Name <new@example.com>", expected_old_value="Old Name <old@example.com>"),
])
w.verify(plan, w.build(plan))
w.apply("main", plan)
# CLI subcommands: snapshot, propose, preview, build, verify, apply
gitwriter --help
When to Reach for It
- Fixing or normalizing Git commit metadata safely with JSON snapshots, previews, and compare-and-swap ref updates.
- Reach for gitdx when you need a standalone pure-Python Git storage and protocol engine without invoking
git.
Gotchas & Pitfalls
- Requires
gitCLI inPATH: Unlike gitdx,gitwriterorchestrates the installedgitbinary via subprocess to rewrite commit metadata safely. - History rewrite changes commit SHAs: Even metadata-only edits (author, committer, message) produce new commit hashes—coordinate force-pushes on shared branches and verify backups under
refs/gitwriter/backup/<ref>before pruning. - Compare-and-swap safety: Expected-old-value checks abort if a ref moved concurrently; re-snapshot before retrying rather than bypassing verification.
Pairs With
- gitdx — Companion pure-Python Git engine family.
Metadata
type: project-card
slug: gitwriter
org: wispsy
repo: wispsy/gitwriter
package: gitwriter
version: 0.1.0
requires_python: ">=3.10"
layer: tooling
topic: wispsy-tooling
status: active
language: python
source_docs: README.md, docs/
Linked from
Related notes
- wiki/projects/parsethon Linked here; links to this page; shared tags: #project, #tier, #tooling, #wispsy
- wiki/projects/shimify Linked here; links to this page; shared tags: #project, #tier, #tooling, #wispsy
- wiki/projects/gitdx Linked here; links to this page; shared tags: #project, #tier, #wispsy
- wiki/stack/tooling Linked here; links to this page; shared tags: #tier, #tooling, #wispsy
- wiki/projects Linked here; links to this page; shared tags: #wispsy
- wiki/choosing links to this page; shared tags: #tier, #wispsy
- wiki/compatibility links to this page; shared tags: #tier, #wispsy
- wiki/families links to this page; shared tags: #tier, #wispsy
- wiki/orgs/wispsy Linked here; shared tags: #tier, #wispsy
- tuts/third_party/python3/wispsy links to this page; shared tags: #tier