safegit v0.26.0 /safegit commit
On this page

Reference for the safegit commit command — usage, flags, arguments, and examples for the commit subcommand of the safegit CLI.

#safegit commit

stage and commit specified files in a single atomic operation

Effect: mutating

#Flags

Flags
NameShortTypeDefaultEnvDescription
--m-mstrcommit message line; can be repeated to build multi-line messages
--F-Fstrread the full commit message body from a file instead of --m flags
--branchstrcommit the staged files onto a different branch without switching to it
--amendboolamend the current HEAD commit by replacing it with updated content
--allow-emptyboolallow creating a commit even when no files have been changed
--trailerstradd a key-value trailer line to the commit message (repeatable)

#Arguments

Arguments
NameRequiredDescription
filesnofiles to commit (supports hunk specs: file.go:1,3)

#Grants

Grants
KindNameReason
proc_mutateparent-bumpcommitting in a submodule moves the parent's gitlink, so safegit commits the parent too when commit.autoBumpParent is on
Search