Re: [PATCH 3/5] doc: git-add: simplify discussion of ignored files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 12, 2025 at 4:10 PM Julia Evans via GitGitGadget
<gitgitgadget@xxxxxxxxx> wrote:
>
> From: Julia Evans <julia@xxxxxxx>
>
> - Mention the --force option earlier
> - Remove the explanation of shell globbing vs git's internal glob
>   system, it's a common gotcha but I don't think this is an appropriate
>   place to explain that concept. There's some discussion of the gotchas
>   around globbing and `git add` in the EXAMPLES section which I think
>   is clearer.
>
> Signed-off-by: Julia Evans <julia@xxxxxxx>
> ---
>  Documentation/git-add.adoc | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/Documentation/git-add.adoc b/Documentation/git-add.adoc
> index 99ca2d0f7e21..0c4ca1794c91 100644
> --- a/Documentation/git-add.adoc
> +++ b/Documentation/git-add.adoc
> @@ -34,12 +34,11 @@ 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 `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.

This reads more clearly to me, although I think it's worth trying to
keep the style "The `git add` command" command to avoid strange
punctuation/capitalization at the start of a sentence.

Thanks for working on these :)

-- 
D. Ben Knoble





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux