Code

color-words: take an optional regular expression describing words
[git.git] / Documentation / git-add.txt
index 9c6b081e6c09bc105aae0b447260792fecd175d8..7c129cb24f0e1c902a81b996ce84ab7e614079c4 100644 (file)
@@ -8,8 +8,9 @@ git-add - Add file contents to the index
 SYNOPSIS
 --------
 [verse]
 SYNOPSIS
 --------
 [verse]
-'git-add' [-n] [-v] [-f] [--interactive | -i] [--patch | -p] [-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
 -----------
 
 DESCRIPTION
 -----------
@@ -59,6 +60,7 @@ OPTIONS
         Be verbose.
 
 -f::
         Be verbose.
 
 -f::
+--force::
        Allow adding otherwise ignored files.
 
 -i::
        Allow adding otherwise ignored files.
 
 -i::
@@ -75,6 +77,7 @@ OPTIONS
        the specified filepatterns before exiting.
 
 -u::
        the specified filepatterns before exiting.
 
 -u::
+--update::
        Update only files that git already knows about, staging modified
        content for commit and marking deleted files for removal. This
        is similar
        Update only files that git already knows about, staging modified
        content for commit and marking deleted files for removal. This
        is similar
@@ -83,6 +86,21 @@ OPTIONS
        command line. If no paths are specified, all tracked files in the
        current directory and its subdirectories are updated.
 
        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.
 --refresh::
        Don't add the file(s), but only refresh their stat()
        information in the index.
@@ -104,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
 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
 
 
 EXAMPLES
@@ -184,8 +202,9 @@ update::
    "Update>>".  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
    "Update>>".  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.  You can say '*' to choose
-   everything.
+   2,3,4,5,7,9 from the list.  If the second number in a range is
+   omitted, all remaining patches are taken.  E.g. "7-" to choose
+   7,8,9 from the list.  You can say '*' to choose everything.
 +
 What you chose are then highlighted with '*',
 like this:
 +
 What you chose are then highlighted with '*',
 like this:
@@ -233,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
        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
        ? - print help
 +
 After deciding the fate for all hunks, if there is any hunk