Find git to ignore file and line, forcing ignore git file

How to find gitignore file and line causing file to be ignored with git?

+8
git
source share
1 answer

From the root of the repo, try the following:

find . ~/.gitignore .git/info/exclude -name '*gitignore' -exec cat {} + | less 

Also make sure you are not using a different exception file:

 git config -l | grep exclude core.excludesfile=~/.gitignore 

You can also get this error if you have submodules in a subfolder instead in the root directory of your git project .

Thanks to Jon Lin and Christopher to help me figure this out on the original question .

+11
source share

All Articles