{"thread":{"id":"49968","subject":"Get \"responsible\" .gitignore file / rule","startedAt":"2018-12-07T12:36:25Z","lastAt":"2018-12-07T13:17:41Z","messageCount":3,"participants":["Victor Toni","Eric Sunshine"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"364740","messageId":"CAG0OSgeTqFYGqqOOBF0TbKpsWb70Bv_wQ6-b4Ke=LTg6Z0OUMg@mail.gmail.com","threadId":"49968","inReplyTo":null,"subject":"Get \"responsible\" .gitignore file / rule","fromName":"Victor Toni","fromEmail":"victor.toni@gmail.com","sentAt":"2018-12-07T12:35:55Z","receivedAt":"2018-12-07T12:36:25Z","isPatch":false,"sender":{"key":"victor.toni@gmail.com","avatar":null},"body":"In a rather complex setup with deep directory structure it happens\nevery now and then, that files get ignored when trying to add them.\nAs these files are _not_ shown in `git status` but in `git status\n--ignored` so I guess the culprit is some misconfigured `.gitignore`.\n\nTrying to ad the specific file gives a:\n$ git add ignored/file/name\nThe following paths are ignored by one of your .gitignore files:\nignored/file/name\nUse -f if you really want to add them.\n\nUsing -v doen't add any verbosity. I'm using git 2.19.1.windows.1 if\nthis matters\n\nI'm wondering if there is any way to show which rules (ideally with\nthe .gitignore file they are coming from) are causing a specific file\nto get ignored so I could easily fix the .gitignore file?\n"},{"id":"364741","messageId":"CAPig+cRvJWhnm22Xyb9J1wz2sKLycRKbAg299QfTZu5Tq8F07g@mail.gmail.com","threadId":"49968","inReplyTo":"CAG0OSgeTqFYGqqOOBF0TbKpsWb70Bv_wQ6-b4Ke=LTg6Z0OUMg@mail.gmail.com","subject":"Re: Get \"responsible\" .gitignore file / rule","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-12-07T12:44:47Z","receivedAt":"2018-12-07T12:45:02Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Fri, Dec 7, 2018 at 7:36 AM Victor Toni <victor.toni@gmail.com> wrote:\n> I'm wondering if there is any way to show which rules (ideally with\n> the .gitignore file they are coming from) are causing a specific file\n> to get ignored so I could easily fix the .gitignore file?\n\nPerhaps the \"git check-ignore\" command would help.\n"},{"id":"364742","messageId":"CAG0OSgdSfxzB1L_hsu9kwHshwckhf+Ay9QiWTZt2d5mNT3ykKw@mail.gmail.com","threadId":"49968","inReplyTo":"CAPig+cRvJWhnm22Xyb9J1wz2sKLycRKbAg299QfTZu5Tq8F07g@mail.gmail.com","subject":"Re: Get \"responsible\" .gitignore file / rule","fromName":"Victor Toni","fromEmail":"victor.toni@gmail.com","sentAt":"2018-12-07T13:17:11Z","receivedAt":"2018-12-07T13:17:41Z","isPatch":false,"sender":{"key":"victor.toni@gmail.com","avatar":null},"body":"Am Fr., 7. Dez. 2018 um 13:45 Uhr schrieb Eric Sunshine\n<sunshine@sunshineco.com>:\n>\n> On Fri, Dec 7, 2018 at 7:36 AM Victor Toni <victor.toni@gmail.com> wrote:\n> > I'm wondering if there is any way to show which rules (ideally with\n> > the .gitignore file they are coming from) are causing a specific file\n> > to get ignored so I could easily fix the .gitignore file?\n>\n> Perhaps the \"git check-ignore\" command would help.\n\nThanks for the tip!\nWorks like a charm (had to use the --verbose option though, without,\nit does not give much feedback)\n"}]}