Autogenerated man pages for v1.1.4-g5b2b
[git.git] / man1 / git-commit.1
1 .\"Generated by db2man.xsl. Don't modify this, modify the source.
2 .de Sh \" Subsection
3 .br
4 .if t .Sp
5 .ne 5
6 .PP
7 \fB\\$1\fR
8 .PP
9 ..
10 .de Sp \" Vertical space (when we can't use .PP)
11 .if t .sp .5v
12 .if n .sp
13 ..
14 .de Ip \" List item
15 .br
16 .ie \\n(.$>=3 .ne \\$3
17 .el .ne 3
18 .IP "\\$1" \\$2
19 ..
20 .TH "GIT-COMMIT" 1 "" "" ""
21 .SH NAME
22 git-commit \- Record your changes
23 .SH "SYNOPSIS"
24
25 .nf
26 git\-commit [\-a] [\-s] [\-v] [(\-c | \-C) <commit> | \-F <file> | \-m <msg>]
27            [\-e] [\-\-] <file>...
28 .fi
29
30 .SH "DESCRIPTION"
31
32
33 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\&.
34
35
36 This command can run commit\-msg, pre\-commit, and post\-commit hooks\&. See hooks: \fIhooks.html\fR for more information\&.
37
38 .SH "OPTIONS"
39
40 .TP
41 \-a|\-\-all
42 Update all paths in the index file\&. This flag notices files that have been modified and deleted, but new files you have not told git about are not affected\&.
43
44 .TP
45 \-c or \-C <commit>
46 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\&.
47
48 .TP
49 \-F <file>
50 Take the commit message from the given file\&. Use \- to read the message from the standard input\&.
51
52 .TP
53 \-m <msg>
54 Use the given <msg> as the commit message\&.
55
56 .TP
57 \-s|\-\-signoff
58 Add Signed\-off\-by line at the end of the commit message\&.
59
60 .TP
61 \-v|\-\-verify
62 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\&.
63
64 .TP
65 \-n|\-\-no\-verify
66 The opposite of \-\-verify\&.
67
68 .TP
69 \-e|\-\-edit
70 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\&.
71
72 .TP
73 --
74 Do not interpret any more arguments as options\&.
75
76 .TP
77 <file>...
78 Update specified paths in the index file before committing\&.
79
80
81 If you make a commit and then found a mistake immediately after that, you can recover from it with \fBgit\-reset\fR(1)\&.
82
83 .SH "AUTHOR"
84
85
86 Written by Linus Torvalds <torvalds@osdl\&.org> and Junio C Hamano <junkio@cox\&.net>
87
88 .SH "GIT"
89
90
91 Part of the \fBgit\fR(7) suite
92