2005-09-08 08:26:23 +08:00
|
|
|
git-commit(1)
|
|
|
|
=============
|
2005-08-09 08:39:18 +08:00
|
|
|
v0.99.4, Aug 2005
|
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
2005-09-08 08:26:23 +08:00
|
|
|
git-commit - Record your changes
|
2005-08-09 08:39:18 +08:00
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
2005-09-03 12:19:26 +08:00
|
|
|
'git commit' [-a] [-s] [-v] [(-c | -C) <commit> | -F <file> | -m <msg>] [-e] <file>...
|
2005-08-09 08:39:18 +08:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
|
|
|
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
|
|
|
|
message.
|
|
|
|
|
2005-09-03 12:19:26 +08:00
|
|
|
This command can run `commit-msg`, `pre-commit`, and
|
|
|
|
`post-commit` hooks. See link:hooks.html[hooks] for more
|
|
|
|
information.
|
|
|
|
|
2005-08-09 08:39:18 +08:00
|
|
|
OPTIONS
|
|
|
|
-------
|
|
|
|
-a::
|
|
|
|
Update all paths in the index file.
|
|
|
|
|
|
|
|
-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
|
|
|
|
message.
|
|
|
|
|
|
|
|
-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.
|
|
|
|
|
2005-08-15 08:24:36 +08:00
|
|
|
-s::
|
|
|
|
Add Signed-off-by line at the end of the commit message.
|
|
|
|
|
|
|
|
-v::
|
|
|
|
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.
|
|
|
|
|
2005-09-03 12:19:26 +08:00
|
|
|
-e::
|
|
|
|
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.
|
|
|
|
|
2005-08-09 08:39:18 +08:00
|
|
|
<file>...::
|
2005-09-03 12:19:26 +08:00
|
|
|
Update specified paths in the index file before committing.
|
2005-08-09 08:39:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
Author
|
|
|
|
------
|
2005-08-15 08:24:36 +08:00
|
|
|
Written by Linus Torvalds <torvalds@osdl.org> and
|
|
|
|
Junio C Hamano <junkio@cox.net>
|
|
|
|
|
2005-08-09 08:39:18 +08:00
|
|
|
|
|
|
|
GIT
|
|
|
|
---
|
|
|
|
Part of the link:git.html[git] suite
|