Skip to content

Commit 952b2f5

Browse files
committed
doc: git-add: simplify discussion of ignored files
- Mention the --force option earlier - Remove the explanation of shell globbing vs git's internal glob system, since users are confused by it and there's a clearer discussion in the EXAMPLES section. Signed-off-by: Julia Evans <[email protected]>
1 parent 080720c commit 952b2f5

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Documentation/git-add.adoc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,10 @@ you must run `git add` again to add the new content to the index.
3737
The `git status` command can be used to obtain a summary of which
3838
files have changes that are staged for the next commit.
3939

40-
The `git add` command will not add ignored files by default. If any
41-
ignored files were explicitly specified on the command line, `git add`
42-
will fail with a list of ignored files. Ignored files reached by
43-
directory recursion or filename globbing performed by Git (quote your
44-
globs before the shell) will be silently ignored. The `git add` command can
45-
be used to add ignored files with the `-f` (force) option.
40+
`git add` will not add ignored files by default. You can use the
41+
`--force` option to add ignored files. If you specify the exact filename
42+
of an ignored file, `git add` will fail with a list of ignored files.
43+
Otherwise it will silently ignore the file.
4644

4745
Please see linkgit:git-commit[1] for alternative ways to add content to a
4846
commit.

0 commit comments

Comments
 (0)