rrt git
rrt git
Section titled “rrt git”Git workflow helpers for repository status, commit, sync, and history operations.
Overview
Section titled “Overview”repo-release-tools ships a small set of opinionated Git workflows for branch
health, commit drafting, sync, and history repair. The tool group favors compact,
human-readable summaries with explicit safety checks before any destructive
operation.
Most commands are designed to run from a Git work tree and emit a short summary first, followed by the details needed to act on the result.
Workflow map
Section titled “Workflow map”- Inspect:
rrt git status,diff,log,doctor,sync-status,check-dirty-tree - Draft commits:
rrt git commit,commit-all,squash-local - Move and sync:
rrt git sync,move,undo-safe,rebootstrap - Branch workflows:
rrt branch new,rescue,rename - Publish:
rrt git publish-snapshotforce-pushes a single-commit, no-history snapshot of tracked content to a secondary remote (e.g. a public mirror);--excludedrops specific paths (secrets, internal docs) from that snapshot.rrt git backport-from-targetis the read-only counterpart: it fetches a publish target and lists commits pending backport to the primary, along with the exact commands to cherry-pick them manually.
Responsibilities
Section titled “Responsibilities”- provide a high-level API for common Git operations used in release flows
- enforce repository policies during commit drafting and branch management
- automate repetitive tasks like auto-stashing during branch switches
- generate human-friendly summaries of repository state and history
- ensure safe operation through dry-run modes and state validation
Notable behavior
Section titled “Notable behavior”- Commit Drafting:
rrt git commitinfers the commit type from the current branch only when the branch follows the conventionaltype/slugformat. - State Management:
syncandmoveautomatically stash local changes before execution and restore them afterward. - History Repair:
undo-safeandrebootstrapprovide controlled ways to rewrite history, withrebootstraprequiring explicit confirmation. - Validation: Refuses to continue in unsafe states, such as unresolved conflicts or in-progress merges.
- Latest tag lookup:
latest_tagandlatest_final_tagpick a group’s newest release tag. Only tags starting with the group’stag_prefixcount. The remainder must parse as SemVer or CalVer; anything else is skipped. Tags sort by version precedence, sov1.0.0beatsv1.0.0-rc.2.latest_final_tagignores pre-releases.rrt bump,rrt release notesandrrt tagall share this lookup.
Examples
Section titled “Examples”rrt git statusrrt git commit "refresh help examples"rrt git sync --dry-runrrt git squash-local --base-ref origin/main "ship parser"rrt git rebootstrap --yes-i-know-this-destroys-history --dry-run
Caveats
Section titled “Caveats”undo-safeandrebootstraprewrite repository history.rebootstraprequires explicit confirmation before it destroys anything.syncandmovestash your local changes automatically and restore them afterwards. The working tree is touched even on a run you expected to be read-only.rrt git commitonly infers the commit type from the branch when that branch follows the conventionaltype/slugformat.- These commands refuse to continue in unsafe states, such as unresolved conflicts or an in-progress merge.
- The latest-tag lookup matches the prefix literally, not as a glob. With
prefix
v, a tag namedvnextis ignored rather than breaking the range. Build metadata never decides precedence; equal versions fall back to tag name.
Related docs
Section titled “Related docs”Badge families are intentionally complete for the current icon registry across platform, registry, and language labels; see src/repo_release_tools/tools/platform.py if you think one is missing.
Chat is powered by Context7, a third-party service with its own terms and privacy policy.