safegit v0.26.0 /safegit CLI Reference
On this page

Index of all safegit CLI commands and command groups — commit, push, undo, doctor, config, hook, and guarded passthroughs with navigation links.

#safegit CLI Reference

concurrency-safe git wrapper providing 31 commands for multi-agent use with atomic commits, oplog-based undo, and history rewriting

Version: 0.26.0

#Commands

  • bisect -- binary search through commits to find a bug, with safety guards
  • checkout -- checkout a branch or ref with working-tree safety guards
  • cherry-pick -- cherry-pick one or more commits onto HEAD with safety guards
  • commit -- stage and commit specified files in a single atomic operation
  • doctor -- run diagnostic health checks on the repository and optionally repair issues
  • merge -- merge a branch into HEAD with working-tree safety guards
  • pull -- fetch from remote and merge, defaulting to fast-forward-only mode
  • push -- push refs to remote with pre-pre-push hooks and automatic retry
  • rebase -- rebase current branch onto upstream with safety guards
  • reset -- reset HEAD with guards that prevent accidental --hard data loss
  • revert -- revert one or more commits creating inverse patches, with safety guards
  • scan -- search git history for regex pattern matches across all objects and working tree files, scanning blobs, commit messages, tag annotations, and trailers with optional scope filtering and commit range selection
  • undo -- reverse the last commit, amend, or reword operation using the oplog
  • unlock -- release a stale .lock file left behind by a crashed git process
  • version -- print safegit version, Go runtime version, and git version

#Command Groups

  • author -- audit and rewrite commit author/committer identity — list all identities, check against expected values, and rewrite name or email across history
  • backup -- push, list, and restore per-branch history backups held in the tool-owned refs/backups namespace on a remote, so uncommitted-to-the-world work survives a lost machine without ever touching refs/heads
  • config -- show, get, or set safegit configuration key-value pairs
  • hook -- manage pre-pre-push hook scripts that run before every push
  • scrub -- surgically rewrite git history to remove or replace sensitive content using 4 subcommands (file, match, run, verify) that operate on all commits, trees, and blobs in the repository

#Global flags

Global flags
NameShortTypeDefaultEnvDescription
--config-filestrpath to a custom safegit config file instead of the default location
--jsonboolemit machine-readable JSON output to stdout instead of human text

#Framework flags

These flags are owned by the strictcli framework, not by the app. No command may declare a flag with one of these names, and each is recognized anywhere on the command line.

Framework flags
FlagEffect
--dry-runPreview mode: no mutation runs. The framework prints a log of every effect the command would have performed.
--approve-consequentialSkips the confirmation prompt a consequential command shows before it runs.
--quietHides informational output. Warnings, errors, structured data and the dry-run log are never suppressed.
--verboseShows debug output. --quiet wins when both are passed.

#Infrastructure

#Handshake variables

Handshake variables
Env varDescription
CLAUDE_CODE_SESSION_IDClaude Code session identifier set by the invoking agent session; scopes 'safegit undo' to operations this session performed and is recorded as a commit trailer

#Deprecated

  • rewrite-author -- use 'safegit author rewrite' instead
Search