Code

Merge branch 'maint-1.6.0' into maint-1.6.1
[git.git] / Documentation / git-add.txt
index 815864c37fb42dd6c859253aa219685fca242f47..e4c711bbd2d1a95d501978673bc52f7a2957fba7 100644 (file)
@@ -8,9 +8,9 @@ git-add - Add file contents to the index
 SYNOPSIS
 --------
 [verse]
-'git-add' [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p]
-         [--update | -u] [--refresh] [--ignore-errors] [--]
-         <filepattern>...
+'git add' [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p]
+         [--all | [--update | -u]] [--intent-to-add | -N]
+         [--refresh] [--ignore-errors] [--] <filepattern>...
 
 DESCRIPTION
 -----------
@@ -86,6 +86,21 @@ OPTIONS
        command line. If no paths are specified, all tracked files in the
        current directory and its subdirectories are updated.
 
+-A::
+--all::
+       Update files that git already knows about (same as '\--update')
+       and add all untracked files that are not ignored by '.gitignore'
+       mechanism.
+
+
+-N::
+--intent-to-add::
+       Record only the fact that the path will be added later. An entry
+       for the path is placed in the index with no content. This is
+       useful for, among other things, showing the unstaged content of
+       such files with 'git diff' and committing them with 'git commit
+       -a'.
+
 --refresh::
        Don't add the file(s), but only refresh their stat()
        information in the index.
@@ -107,7 +122,7 @@ Configuration
 The optional configuration variable 'core.excludesfile' indicates a path to a
 file containing patterns of file names to exclude from git-add, similar to
 $GIT_DIR/info/exclude.  Patterns in the exclude file are used in addition to
-those in info/exclude.  See linkgit:gitrepository-layout[5][repository layout].
+those in info/exclude.  See linkgit:gitrepository-layout[5].
 
 
 EXAMPLES
@@ -121,7 +136,7 @@ $ git add Documentation/\\*.txt
 ------------
 +
 Note that the asterisk `\*` is quoted from the shell in this
-example; this lets the command to include the files from
+example; this lets the command include the files from
 subdirectories of `Documentation/` directory.
 
 * Considers adding content from all git-*.sh scripts:
@@ -130,7 +145,7 @@ subdirectories of `Documentation/` directory.
 $ git add git-*.sh
 ------------
 +
-Because this example lets shell expand the asterisk (i.e. you are
+Because this example lets the shell expand the asterisk (i.e. you are
 listing the files explicitly), it does not consider
 `subdir/git-foo.sh`.
 
@@ -183,8 +198,8 @@ one deletion).
 
 update::
 
-   This shows the status information and gives prompt
-   "Update>>".  When the prompt ends with double '>>', you can
+   This shows the status information and issues an "Update>>"
+   prompt.  When the prompt ends with double '>>', you can
    make more than one selection, concatenated with whitespace or
    comma.  Also you can say ranges.  E.g. "2-5 7,9" to choose
    2,3,4,5,7,9 from the list.  If the second number in a range is
@@ -223,8 +238,8 @@ add untracked::
 
 patch::
 
-  This lets you choose one path out of 'status' like selection.
-  After choosing the path, it presents diff between the index
+  This lets you choose one path out of 'status' like selection.
+  After choosing the path, it presents the diff between the index
   and the working tree file and asks you if you want to stage
   the change of each hunk.  You can say:
 
@@ -237,6 +252,7 @@ patch::
        k - leave this hunk undecided, see previous undecided hunk
        K - leave this hunk undecided, see previous hunk
        s - split the current hunk into smaller hunks
+       e - manually edit the current hunk
        ? - print help
 +
 After deciding the fate for all hunks, if there is any hunk