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