Skip to content

Commit

Permalink
Clarify actual behavior of 'git add' and ignored files
Browse files Browse the repository at this point in the history
Signed-off-by: Brian Downing <bdowning@lavos.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Brian Downing authored and Junio C Hamano committed Aug 16, 2007
1 parent 19b28bf commit d1d028e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Documentation/git-add.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,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 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.
Expand Down

0 comments on commit d1d028e

Please sign in to comment.