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>
maint
J. Bruce Fields 2007-08-05 19:16:09 -04:00
parent 4e0b2bbc57
commit 5f42ac921f
1 changed files with 19 additions and 16 deletions

View File

@ -3,7 +3,7 @@ git-add(1)


NAME NAME
---- ----
git-add - Add file contents to the changeset to be committed next git-add - Add file contents to the index


SYNOPSIS SYNOPSIS
-------- --------
@ -11,24 +11,27 @@ SYNOPSIS


DESCRIPTION DESCRIPTION
----------- -----------
All the changed file contents to be committed together in a single set This command adds the current content of new or modified files to the
of changes must be "added" with the 'add' command before using the index, thus staging that content for inclusion in the next commit.
'commit' command. This is not only for adding new files. Even modified
files must be added to the set of changes about to be committed.


This command can be performed multiple times before a commit. The added The "index" holds a snapshot of the content of the working tree, and it
content corresponds to the state of specified file(s) at the time the is this snapshot that is taken as the contents of the next commit. Thus
'add' command is used. This means the 'commit' command will not consider after making any changes to the working directory, and before running
subsequent changes to already added content if it is not added again before the commit command, you must use the 'add' command to add any new or
the commit. modified files to the index.


The 'git status' command can be used to obtain a summary of what is included This command can be performed multiple times before a commit. It only
for the next commit. adds the content of the specified file(s) at the time the add command is
run; if you want subsequent changes included in the next commit, then
you must run 'git add' again to add the new content to the index.


This command can be used to add ignored files with `-f` (force) The 'git status' command can be used to obtain a summary of which
option, but they have to be files have changes that are staged for the next commit.
explicitly and exactly specified from the command line. File globbing
and recursive behaviour do not add ignored files. The 'add' command can be used to add ignored files with `-f` (force)
option, but they have to be explicitly and exactly specified from the
command line. File globbing and recursive behaviour do not add ignored
files.


Please see gitlink:git-commit[1] for alternative ways to add content to a Please see gitlink:git-commit[1] for alternative ways to add content to a
commit. commit.