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

Re: [PATCH v3 1/4] gitfaq: files in .gitignore are tracked

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 21, 2020, 19:45 UTC
Message-ID
<xmqq7dy8oc5w.fsf@gitster.c.googlers.com>
In-Reply-To
<20200421131223.29337-2-shouryashukla.oo@gmail.com>
Shourya Shukla <shouryashukla.oo@gmail.com> writes:
> Add issue in 'Common Issues' section which addresses the problem of
> Git tracking files/paths mentioned in '.gitignore'.
I do not think this much text is warranted in this file.

The first part of Documentation/gitignore.txt *ought* to cover this material and it does say "specifies intentionally untracked files" and "already tracked byt Git are not affected". Read that paragarph twice, and then jump to the NOTES section it refers two and also read that twice. Then let's work on polishing these places if there is anything unclear. I think what we have there is clear enough.

And then trim the text we see here down. The way the question is phrased may be good as-is (I trust that you researched to make sure that is how the question is most frequently phrased). The answer should be just "see gitignore(5)", or perhaps repeat the first paragraph of gitignore(5) and then refer to the page, i.e. no more than

    [[files-in-.gitignore-are-tracked]]
    I asked Git to ignore various files, yet they are still tracked::
            A `gitignore` file specifies intentionally untracked files
            that Git should ignore.  Files already tracked by Git are
            not affected.  See linkgit:gitignore[5] for details.
should be in the FAQ file.
Previous: Shourya ShuklaNext: Shourya Shukla
Message 3 of 15 in “gitfaq: add issues in the 'Common Issues' section”
  1. 0/4 gitfaq: add issues in the 'Common Issues' sectionShourya Shukla, Apr 21, 2020
  2. 1/4 gitfaq: files in .gitignore are trackedShourya Shukla, Apr 21, 2020
  3. Junio C HamanoApr 21, 2020
  4. 2/4 gitfaq: changing the remote of a repositoryShourya Shukla, Apr 21, 2020
  5. Junio C HamanoApr 21, 2020
  6. Shourya ShuklaApr 27, 2020
  7. 3/4 gitfaq: shallow cloning a repositoryShourya Shukla, Apr 21, 2020
  8. Junio C HamanoApr 21, 2020
  9. Randall S. BeckerApr 21, 2020
  10. Junio C HamanoApr 21, 2020
  11. Randall S. BeckerApr 21, 2020
  12. Derrick StoleeApr 22, 2020
  13. Jonathan NiederApr 22, 2020
  14. Elijah NewrenApr 22, 2020
  15. 4/4 gitfaq: fetching and pulling a repositoryShourya Shukla, Apr 21, 2020

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.