commit
Commit
Options
Default: staged, conventional, trailers denied; hooks off only where host policy permits bypass, otherwise hooks on. "Unstaged work" requires an empty index; untracked files stay excluded. "Plain subject"/"simple message" selects simple. "Run hooks"/"do not skip hooks" selects on. Explicit identity-trailer requests opt in only to those trailers. Conflicting scopes/styles or missing needed values block; hook failure does not change the chosen policy.
1. Lock
Read status and the selected diff (cached for staged, worktree for unstaged).
Empty → NO_CHANGES, naming other layers without switching. Hash selected bytes
with git hash-object. For unstaged, block if index is nonempty.
Record scope | style | hooks | requested trailers | hash | paths | message | command | SHA | terminal.
Done when intended bytes and out-of-scope work are fixed.