blob: e35984dfc7d5a5287ea8231b25c5c8256fb89011 [file] [log] [blame]
git-commit - Record your changes
'git-commit' [-a] [-s] [-v] [(-c | -C) <commit> | -F <file> | -m <msg>]
[-e] [--] <file>...
Updates the index file for given paths, or all modified files if
'-a' is specified, and makes a commit object. The command
VISUAL and EDITOR environment variables to edit the commit log
This command can run `commit-msg`, `pre-commit`, and
`post-commit` hooks. See link:hooks.html[hooks] for more
Update all paths in the index file. This flag notices
files that have been modified and deleted, but new files
you have not told about git are not affected.
-c or -C <commit>::
Take existing commit object, and reuse the log message
and the authorship information (including the timestamp)
when creating the commit. With '-C', the editor is not
invoked; with '-c' the user can further edit the commit
-F <file>::
Take the commit message from the given file. Use '-' to
read the message from the standard input.
-m <msg>::
Use the given <msg> as the commit message.
Add Signed-off-by line at the end of the commit message.
Look for suspicious lines the commit introduces, and
abort committing if there is one. The definition of
'suspicious lines' is currently the lines that has
trailing whitespaces, and the lines whose indentation
has a SP character immediately followed by a TAB
character. This is the default.
The opposite of `--verify`.
The message taken from file with `-F`, command line with
`-m`, and from file with `-C` are usually used as the
commit log message unmodified. This option lets you
further edit the message taken from these sources.
Do not interpret any more arguments as options.
Update specified paths in the index file before committing.
If you make a commit and then found a mistake immediately after
that, you can recover from it with gitlink:git-reset[1].
Written by Linus Torvalds <> and
Junio C Hamano <>
Part of the gitlink:git[7] suite