git-commit.txt: better description what it does
The description of git-commit jumps right into the commit content, which is important, but it fails to mention how the commit is "added" to the repository. Update the first paragraph saying a bit more about branch update to fill this gap. While at there, add a couple linkgit references when the command is first mentioned. Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
Feb 1, 2019 at 17:09 UTC
5cfd4a9d108fa739c96beaa2dbcee3d7911db2a9
1 file changed
+11
-7
Documentation/git-commit.txt
+11
-7
@@ -17,16 +17,20 @@ SYNOPSIS
17
18
DESCRIPTION
19
-----------
20
-Stores the current contents of the index in a new commit along
21
-with a log message from the user describing the changes.
20
+Create a new commit containing the current contents of the index and
21
+the given log message describing the changes. The new commit is a
22
+direct child of HEAD, usually the tip of the current branch, and the
23
+branch is updated to point to it (unless no branch is associated with
24
+the working tree, in which case HEAD is "detached" as described in
25
+linkgit:git-checkout[1]).
26
23
-The content to be added can be specified in several ways:
27
+The content to be committed can be specified in several ways:
28
25
-1. by using 'git add' to incrementally "add" changes to the
26
- index before using the 'commit' command (Note: even modified
27
- files must be "added");
29
+1. by using linkgit:git-add[1] to incrementally "add" changes to the
30
+ index before using the 'commit' command (Note: even modified files
31
+ must be "added");
32
29
-2. by using 'git rm' to remove files from the working tree
33
+2. by using linkgit:git-rm[1] to remove files from the working tree
34
and the index, again before using the 'commit' command;
35
36
3. by listing files as arguments to the 'commit' command