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

Re: Git add claims path is ignored, but git check-ignore returns no results

From
Jeff King <peff@peff.net>
Date
Aug 12, 2019, 16:35 UTC
Message-ID
<20190812163517.GA26231@sigill.intra.peff.net>
In-Reply-To
<1229468090.3098018.1565627099656@mail.yahoo.com>
On Mon, Aug 12, 2019 at 04:24:59PM +0000, geoffsimons@aim.com wrote:
Show 12 quoted lines
> I can’t find anything relevant in .git/info/exclude either, or any of
> the .gitignore files I could find.
> 
> git check-ignore .\Source\UI\Website\LiveFeeds\Releases\IO\ReleasesSerializer.cs
> git add .\Source\ui\Website\LiveFeeds\Releases\io\ReleasesSerializer.cs
> The following paths are ignored by one of your .gitignore files:
> Source/ui/Website/LiveFeeds/Releases/io/ReleasesSerializer.cs
> Use -f if you really want to add them.
> 
> I get a similar result for adding files in that directory, or the
> parent directory (releases), but the grandparent directory (livefeeds)
> works fine.  Any ideas what might be causing this?

I notice that your "add" and "check-ignore" commands differ in the case of "UI". I think both commands should work correctly when on a case-insensitive filesystem (and a few checks I did after setting core.ignorecase manually seem to confirm this).

But maybe try it with "ui" in the check-ignore command and see if that changes anything?

Another thing I notice is that you're using Windows-style back-slashes for the path separators (whereas internally in Git, everything is front-slashes). AFAIK that's supposed to work everywhere on Windows, but I wouldn't be surprised if there are corner cases where it doesn't. Does switching to:

  git check-ignore ./Source/ui/Website/LiveFeeds/Releases/IO/ReleasesSerializer.cs
help?
-Peff
Previous: geoffsimons@aim.comNext: geoffsimons@aim.com
Message 2 of 3 in “Git add claims path is ignored, but git check-ignore returns no results”
  1. geoffsimons@aim.comAug 12, 2019
  2. Jeff KingAug 12, 2019
  3. geoffsimons@aim.comAug 12, 2019

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.