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

Re: How can I tell if a file is ignored by git?

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Apr 9, 2010, 05:01 UTC
Message-ID
<w2i51dd1af81004082201j81a2758di2e430785a72a5b03@mail.gmail.com>
In-Reply-To
<w2hf3271551004082150x620aa21az72b7254f57fbc3f5@mail.gmail.com>
On Fri, Apr 9, 2010 at 04:50, Ramkumar Ramachandra <artagnon@gmail.com> wrote:
> I personally use Magit [1]. Just thought you might want to look at it.
Eric might be a bit too personally invested vc.el at this point :)

But yeah, magit is great, unlike vc-dir and vc it makes really good use of Git's index & stash features. Instead of staging individual files for commit you stage chunks, the quality and granularity of my commits has gone up since I switched to it from vc due to that.

But to help with the original question: magit has an ignore feature but it doesn't check whether something is ignored, it just counts on you not ignoring already ignored stuff because it isn't displayed to you.

Depending on how you're planning to implement .gitignore support you might want to go this route.

Previous: Ramkumar RamachandraNext: Eric Raymond
Message 16 of 19 in “How can I tell if a file is ignored by git?”
  1. Eric RaymondApr 9, 2010
  2. Jacob HelwigApr 9, 2010
  3. Status of all files (was: Re: How can I tell if a file is ignored by git?Eric Raymond, Apr 9, 2010
  4. Randal L. SchwartzApr 9, 2010
  5. Eric RaymondApr 9, 2010
  6. Junio C HamanoApr 10, 2010
  7. Jakub NarebskiApr 9, 2010
  8. Eric RaymondApr 9, 2010
  9. Matthieu MoyApr 9, 2010
  10. Eric RaymondApr 9, 2010
  11. Junio C HamanoApr 9, 2010
  12. Jakub NarebskiApr 9, 2010
  13. Paolo BonziniApr 10, 2010
  14. Jeff KingApr 11, 2010
  15. Ramkumar RamachandraApr 9, 2010
  16. Ævar Arnfjörð BjarmasonApr 9, 2010
  17. Eric RaymondApr 9, 2010
  18. Daniel GraceApr 9, 2010
  19. Eric RaymondApr 10, 2010

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.