Subject: Re: [PATCH v2 2/4] doc: git-add: simplify discussion of ignored files

From: Junio C Hamano <[email-masked]>
Date: Thu, 14 Aug 2025 15:10:46 -0700

"Julia Evans via GitGitGadget" <[email-masked]> writes:

> -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 `git add` command can
> -be used to add ignored files with the `-f` (force) option.

> +`git add` will not add ignored files by default. You can use the
> +`--force` option to add ignored files. If you explicitly specify the
> +exact filename of an ignored file (e.g. `git add ignored.txt`), `git
> +add` will fail with a list of ignored files. Otherwise it will silently
> +ignore the file.

I think we no longer need to say "explicitly" now that we added
"exact".

The earlier text used "explicitly" because it wanted to say that
"git add t/ 'ig*.txt'" silently ignores "t/ignored-file.txt" and
"ignored-file.txt" because these files are not explicitly named
(they were only implicitly named via recursion or globbing).  Your
new wording "exact filename" already covers these cases.

Do we discuss that "git add t/" attempts to add everything that is
not ignored under the t/ directory elsewhere in this document after
these patches?  If we do, then I am 100% OK with the decision to
stop talking about globs and recursion in this paragraph.  Otherwise,
I would want to see some mention of this "naming directory names its
contents recursively" somewhere in the document (it does not have to
be, but can naturally be, in this paragraph).

Thanks.