git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 4/5] documentation: use the word "index" in the git-add manual page

From
JFJ. Bruce Fields <bfields@citi.umich.edu>
Date
Aug 6, 2007, 04:34 UTC
Message-ID
<6125.06629336185$1186374888@news.gmane.org>
In-Reply-To
<11863748423686-git-send-email->
From: J. Bruce Fields <bfields@pig.linuxdev.us.dell.com>

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>
---
 Documentation/git-add.txt |   41 ++++++++++++++++++++++-------------------
 1 files changed, 22 insertions(+), 19 deletions(-)
diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index a0c9f68..37077b5 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -3,7 +3,7 @@ git-add(1)
 
 NAME
 ----
-git-add - Add file contents to the changeset to be committed next
+git-add - Add file contents to the index
 
 SYNOPSIS
 --------
@@ -11,24 +11,27 @@ SYNOPSIS
 
 DESCRIPTION
 -----------
-All the changed file contents to be committed together in a single set
-of changes must be "added" with the 'add' command before using the
-'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
-content corresponds to the state of specified file(s) at the time the
-'add' command is used. This means the 'commit' command will not consider
-subsequent changes to already added content if it is not added again before
-the commit.
-
-The 'git status' command can be used to obtain a summary of what is included
-for the next commit.
-
-This 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.
+This command adds the current content of new or modified files to the
+index, thus staging that content for inclusion in the next commit.
+
+The "index" holds a snapshot of the content of the working tree, and it
+is this snapshot that is taken as the contents of the next commit.  Thus
+after making any changes to the working directory, and before running
+the commit command, you must use the 'add' command to add any new or
+modified files to the index.
+
+This command can be performed multiple times before a commit.  It only
+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.
+
+The 'git status' command can be used to obtain a summary of which
+files have changes that are staged for the next commit.
+
+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
 commit.
-- 
1.5.3.GIT
Previous: J. Bruce FieldsNext: J. Bruce Fields
Message 4 of 5 in “user-manual: update for new default --track behavior”
  1. 1/5 user-manual: update for new default --track behaviorJ. Bruce Fields, Aug 6, 2007
  2. 2/5 user-manual: mention git stashJ. Bruce Fields, Aug 6, 2007
  3. 3/5 user-manual: mention git-guiJ. Bruce Fields, Aug 6, 2007
  4. 4/5 documentation: use the word "index" in the git-add manual pageJ. Bruce Fields, Aug 6, 2007
  5. 5/5 documentation: use the word "index" in the git-commit man pageJ. Bruce Fields, Aug 6, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.