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