2005-09-08 02:26:23 +02:00
|
|
|
git-commit(1)
|
|
|
|
=============
|
2005-08-09 02:39:18 +02:00
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
2005-09-08 02:26:23 +02:00
|
|
|
git-commit - Record your changes
|
2005-08-09 02:39:18 +02:00
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
2005-12-31 18:37:15 +01:00
|
|
|
[verse]
|
|
|
|
'git-commit' [-a] [-s] [-v] [(-c | -C) <commit> | -F <file> | -m <msg>]
|
|
|
|
[-e] [--] <file>...
|
2005-08-09 02:39:18 +02: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 06:19:26 +02:00
|
|
|
This command can run `commit-msg`, `pre-commit`, and
|
|
|
|
`post-commit` hooks. See link:hooks.html[hooks] for more
|
|
|
|
information.
|
|
|
|
|
2005-08-09 02:39:18 +02:00
|
|
|
OPTIONS
|
|
|
|
-------
|
2005-12-09 00:28:05 +01:00
|
|
|
-a|--all::
|
2006-01-13 21:59:21 +01:00
|
|
|
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.
|
2005-08-09 02:39:18 +02:00
|
|
|
|
|
|
|
-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-12-09 00:28:05 +01:00
|
|
|
-s|--signoff::
|
2005-08-15 02:24:36 +02:00
|
|
|
Add Signed-off-by line at the end of the commit message.
|
|
|
|
|
2005-12-09 00:28:05 +01:00
|
|
|
-v|--verify::
|
2005-08-15 02:24:36 +02:00
|
|
|
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
|
2005-12-09 00:28:05 +01:00
|
|
|
character. This is the default.
|
2005-08-15 02:24:36 +02:00
|
|
|
|
2005-12-09 00:28:05 +01:00
|
|
|
-n|--no-verify::
|
|
|
|
The opposite of `--verify`.
|
|
|
|
|
|
|
|
-e|--edit::
|
2005-09-03 06:19:26 +02:00
|
|
|
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-12-09 00:28:05 +01:00
|
|
|
--::
|
|
|
|
Do not interpret any more arguments as options.
|
|
|
|
|
2005-08-09 02:39:18 +02:00
|
|
|
<file>...::
|
2005-09-03 06:19:26 +02:00
|
|
|
Update specified paths in the index file before committing.
|
2005-08-09 02:39:18 +02:00
|
|
|
|
|
|
|
|
2005-12-17 03:23:33 +01:00
|
|
|
If you make a commit and then found a mistake immediately after
|
|
|
|
that, you can recover from it with gitlink:git-reset[1].
|
|
|
|
|
|
|
|
|
2005-08-09 02:39:18 +02:00
|
|
|
Author
|
|
|
|
------
|
2005-08-15 02:24:36 +02:00
|
|
|
Written by Linus Torvalds <torvalds@osdl.org> and
|
|
|
|
Junio C Hamano <junkio@cox.net>
|
|
|
|
|
2005-08-09 02:39:18 +02:00
|
|
|
|
|
|
|
GIT
|
|
|
|
---
|
2005-09-19 12:10:51 +02:00
|
|
|
Part of the gitlink:git[7] suite
|