From 5cae93566027c1d148c9f6625aed484a7096a980 Mon Sep 17 00:00:00 2001 From: Greg Price Date: Thu, 7 Mar 2013 05:13:15 -0500 Subject: [PATCH] add: Clarify documentation of -A and -u The documentation of '-A' and '-u' is very confusing for someone who doesn't already know what they do. Describe them with fewer words and clearer parallelism to each other and to the behavior of plain 'add'. Also mention the default for '-A' as well as '-u', because it applies to both. Signed-off-by: Greg Price Signed-off-by: Junio C Hamano --- Documentation/git-add.txt | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt index 388a2254f9..b0944e57d5 100644 --- a/Documentation/git-add.txt +++ b/Documentation/git-add.txt @@ -100,12 +100,9 @@ apply to the index. See EDITING PATCHES below. -u:: --update:: - Only match against already tracked files in - the index rather than the working tree. That means that it - will never stage new files, but that it will stage modified - new contents of tracked files and that it will remove files - from the index if the corresponding files in the working tree - have been removed. + Update the index just where it already has an entry matching + . This removes as well as modifies index entries to + match the working tree, but adds no new files. + If no is given, the current version of Git defaults to "."; in other words, update all tracked files in the current directory @@ -114,10 +111,15 @@ of Git, hence the form without should not be used. -A:: --all:: - Like `-u`, but match against files in the - working tree in addition to the index. That means that it - will find new files as well as staging modified content and - removing files that are no longer in the working tree. + Update the index not only where the working tree has a file + matching but also where the index already has an + entry. This adds, modifies, and removes index entries to + match the working tree. ++ +If no is given, the current version of Git defaults to +"."; in other words, update all files in the current directory +and its subdirectories. This default will change in a future version +of Git, hence the form without should not be used. -N:: --intent-to-add::