git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Clarify actual behavior of 'git add' and ignored files

From
Brian Downing <bdowning@lavos.net>
Date
Aug 16, 2007, 22:56 UTC
Message-ID
<11873049683651-git-send-email-bdowning@lavos.net>
Signed-off-by: Brian Downing <bdowning@lavos.net>
---
 Documentation/git-add.txt |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index dee38f8..3383aca 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -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.
-- 
1.5.3.GIT
Message 1 of 1 in “Clarify actual behavior of 'git add' and ignored files”
  1. Clarify actual behavior of 'git add' and ignored filesBrian Downing, Aug 16, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.