]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-commit.txt
Documentation: clarify fetch parameter descriptions.
[thirdparty/git.git] / Documentation / git-commit.txt
CommitLineData
215a7ad1
JH
1git-commit(1)
2=============
62033318
JH
3
4NAME
5----
215a7ad1 6git-commit - Record your changes
62033318
JH
7
8SYNOPSIS
9--------
353ce815
JF
10[verse]
11'git-commit' [-a] [-s] [-v] [(-c | -C) <commit> | -F <file> | -m <msg>]
12 [-e] [--] <file>...
62033318
JH
13
14DESCRIPTION
15-----------
16Updates the index file for given paths, or all modified files if
17'-a' is specified, and makes a commit object. The command
18VISUAL and EDITOR environment variables to edit the commit log
19message.
20
6d35cc76
JH
21This command can run `commit-msg`, `pre-commit`, and
22`post-commit` hooks. See link:hooks.html[hooks] for more
23information.
24
62033318
JH
25OPTIONS
26-------
eaa54efc 27-a|--all::
62033318
JH
28 Update all paths in the index file.
29
30-c or -C <commit>::
31 Take existing commit object, and reuse the log message
32 and the authorship information (including the timestamp)
33 when creating the commit. With '-C', the editor is not
34 invoked; with '-c' the user can further edit the commit
35 message.
36
37-F <file>::
38 Take the commit message from the given file. Use '-' to
39 read the message from the standard input.
40
41-m <msg>::
42 Use the given <msg> as the commit message.
43
eaa54efc 44-s|--signoff::
3f971fc4
JH
45 Add Signed-off-by line at the end of the commit message.
46
eaa54efc 47-v|--verify::
3f971fc4
JH
48 Look for suspicious lines the commit introduces, and
49 abort committing if there is one. The definition of
50 'suspicious lines' is currently the lines that has
51 trailing whitespaces, and the lines whose indentation
52 has a SP character immediately followed by a TAB
eaa54efc 53 character. This is the default.
3f971fc4 54
eaa54efc
NW
55-n|--no-verify::
56 The opposite of `--verify`.
57
58-e|--edit::
6d35cc76
JH
59 The message taken from file with `-F`, command line with
60 `-m`, and from file with `-C` are usually used as the
61 commit log message unmodified. This option lets you
62 further edit the message taken from these sources.
63
eaa54efc
NW
64--::
65 Do not interpret any more arguments as options.
66
62033318 67<file>...::
6d35cc76 68 Update specified paths in the index file before committing.
62033318
JH
69
70
3ae854c3
JH
71If you make a commit and then found a mistake immediately after
72that, you can recover from it with gitlink:git-reset[1].
73
74
62033318
JH
75Author
76------
3f971fc4
JH
77Written by Linus Torvalds <torvalds@osdl.org> and
78Junio C Hamano <junkio@cox.net>
79
62033318
JH
80
81GIT
82---
a7154e91 83Part of the gitlink:git[7] suite