@matheusbsbs / matheus-bagliano / commits / 5f42ac921f
Fork 0

documentation: use the word "index" in the git-add manual page

It was a neat trick to show that you could introduce the git-add manual page without using the word "index", and it was certainly an improvement over the previous man page (which started out "A simple wrapper for git-update-index to add files to the index..."). But it's possible to use the standard terminology without sacrificing user-friendliness. So, rewrite to use the word "index" when appropriate. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

J. Bruce Fields committed Aug 5, 2007 at 19:16 UTC 5f42ac921fe06bbb80df82d8fa5cb15701ec2f60
1 file changed +22 -19
Documentation/git-add.txt
+22 -19
@@ -3,7 +3,7 @@ git-add(1)
3
4 NAME
5 ----
6 -git-add - Add file contents to the changeset to be committed next
6 +git-add - Add file contents to the index
7
8 SYNOPSIS
9 --------
@@ -11,24 +11,27 @@ SYNOPSIS
11
12 DESCRIPTION
13 -----------
14 -All the changed file contents to be committed together in a single set
15 -of changes must be "added" with the 'add' command before using the
16 -'commit' command. This is not only for adding new files. Even modified
17 -files must be added to the set of changes about to be committed.
18 -
19 -This command can be performed multiple times before a commit. The added
20 -content corresponds to the state of specified file(s) at the time the
21 -'add' command is used. This means the 'commit' command will not consider
22 -subsequent changes to already added content if it is not added again before
23 -the commit.
24 -
25 -The 'git status' command can be used to obtain a summary of what is included
26 -for the next commit.
27 -
28 -This command can be used to add ignored files with `-f` (force)
29 -option, but they have to be
30 -explicitly and exactly specified from the command line. File globbing
31 -and recursive behaviour do not add ignored files.
14 +This command adds the current content of new or modified files to the
15 +index, thus staging that content for inclusion in the next commit.
16 +
17 +The "index" holds a snapshot of the content of the working tree, and it
18 +is this snapshot that is taken as the contents of the next commit. Thus
19 +after making any changes to the working directory, and before running
20 +the commit command, you must use the 'add' command to add any new or
21 +modified files to the index.
22 +
23 +This command can be performed multiple times before a commit. It only
24 +adds the content of the specified file(s) at the time the add command is
25 +run; if you want subsequent changes included in the next commit, then
26 +you must run 'git add' again to add the new content to the index.
27 +
28 +The 'git status' command can be used to obtain a summary of which
29 +files have changes that are staged for the next commit.
30 +
31 +The 'add' command can be used to add ignored files with `-f` (force)
32 +option, but they have to be explicitly and exactly specified from the
33 +command line. File globbing and recursive behaviour do not add ignored
34 +files.
35
36 Please see gitlink:git-commit[1] for alternative ways to add content to a
37 commit.