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

Get "responsible" .gitignore file / rule

From
VTVictor Toni <victor.toni@gmail.com>
Date
Dec 7, 2018, 12:35 UTC
Message-ID
<CAG0OSgeTqFYGqqOOBF0TbKpsWb70Bv_wQ6-b4Ke=LTg6Z0OUMg@mail.gmail.com>

In a rather complex setup with deep directory structure it happens every now and then, that files get ignored when trying to add them. As these files are _not_ shown in `git status` but in `git status --ignored` so I guess the culprit is some misconfigured `.gitignore`.

Trying to ad the specific file gives a: $ git add ignored/file/name The following paths are ignored by one of your .gitignore files: ignored/file/name Use -f if you really want to add them.

Using -v doen't add any verbosity. I'm using git 2.19.1.windows.1 if this matters

I'm wondering if there is any way to show which rules (ideally with the .gitignore file they are coming from) are causing a specific file to get ignored so I could easily fix the .gitignore file?

Next: Eric Sunshine
Message 1 of 3 in “Get "responsible" .gitignore file / rule”
  1. Victor ToniDec 7, 2018
  2. Eric SunshineDec 7, 2018
  3. Victor ToniDec 7, 2018

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.