X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-add.txt;h=2fe73555559d5a31a7122c9e5ebb039db9428dbc;hb=04222b245c5e0d49242ef1ca995fadd5fa082cd3;hp=4af3a9b0d78d70d101196326d4c6fbadd743b924;hpb=04d70bebe72c264a1c4d26cbe306672e3e4098e3;p=git.git diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt index 4af3a9b0d..2fe735555 100644 --- a/Documentation/git-add.txt +++ b/Documentation/git-add.txt @@ -7,7 +7,9 @@ git-add - Add file contents to the index SYNOPSIS -------- -'git-add' [-n] [-v] [-f] [--interactive | -i] [-u] [--] ... +[verse] +'git-add' [-n] [-v] [-f] [--interactive | -i] [-u] [--refresh] + [--] ... DESCRIPTION ----------- @@ -28,10 +30,12 @@ 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. +The 'git add' command will not add ignored files by default. If any +ignored files were explicitly specified on the command line, 'git add' +will fail with a list of ignored files. Ignored files reached by +directory recursion or filename globbing performed by Git (quote your +globs before the shell) will be silently ignored. The 'add' command can +be used to add ignored files with the `-f` (force) option. Please see gitlink:git-commit[1] for alternative ways to add content to a commit. @@ -39,7 +43,7 @@ commit. 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` @@ -66,6 +70,10 @@ OPTIONS command line. If no paths are specified, all tracked files are updated. +\--refresh:: + Don't add the file(s), but only refresh their stat() + information in the index. + \--:: This option can be used to separate command-line options from the list of files, (useful when filenames might be mistaken