Merge branch 'ss/check-builtins-on-windows'
[gitweb.git] / Documentation / git-add.txt
index c7f83fd696df1cea63d4f38477b89a546fd75537..1c74907dd4c9021f41d88cf9f766c4855c0d6f97 100644 (file)
@@ -8,7 +8,7 @@ git-add - Add file contents to the index
 SYNOPSIS
 --------
 [verse]
-'git add' [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p]
+'git add' [--verbose | -v] [--dry-run | -n] [--force | -f] [--interactive | -i] [--patch | -p]
          [--edit | -e] [--[no-]all | --[no-]ignore-removal | [--update | -u]]
          [--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing]
          [--] [<pathspec>...]
@@ -53,8 +53,14 @@ OPTIONS
        Files to add content from.  Fileglobs (e.g. `*.c`) can
        be given to add all matching files.  Also a
        leading directory name (e.g. `dir` to add `dir/file1`
-       and `dir/file2`) can be given to add all files in the
-       directory, recursively.
+       and `dir/file2`) can be given to update the index to
+       match the current state of the directory as a whole (e.g.
+       specifying `dir` will record not just a file `dir/file1`
+       modified in the working tree, a file `dir/file2` added to
+       the working tree, but also a file `dir/file3` removed from
+       the working tree.  Note that older versions of Git used
+       to ignore removed files; use `--no-all` option if you want
+       to add modified or new files but ignore removed ones.
 
 -n::
 --dry-run::
@@ -129,11 +135,9 @@ subdirectories).
        files that have been removed from the working tree.  This
        option is a no-op when no <pathspec> is used.
 +
-This option is primarily to help the current users of Git, whose
-"git add <pathspec>..." ignores removed files.  In future versions
-of Git, "git add <pathspec>..." will be a synonym to "git add -A
-<pathspec>..." and "git add --ignore-removal <pathspec>..." will behave like
-today's "git add <pathspec>...", ignoring removed files.
+This option is primarily to help users who are used to older
+versions of Git, whose "git add <pathspec>..." was a synonym
+for "git add --no-all <pathspec>...", i.e. ignored removed files.
 
 -N::
 --intent-to-add::
@@ -296,9 +300,9 @@ patch::
 
        y - stage this hunk
        n - do not stage this hunk
-       q - quit; do not stage this hunk nor any of the remaining ones
+       q - quit; do not stage this hunk or any of the remaining ones
        a - stage this hunk and all later hunks in the file
-       d - do not stage this hunk nor any of the later hunks in the file
+       d - do not stage this hunk or any of the later hunks in the file
        g - select a hunk to go to
        / - search for a hunk matching the given regex
        j - leave this hunk undecided, see next undecided hunk