查找gitignore文件和行,导致文件被git忽略 [英] Find gitignore file and line causing a file to be ignored by git
本文介绍了查找gitignore文件和行,导致文件被git忽略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何找到gitignore文件和行,导致文件被git忽略?
解决方案
repo root,试试这个:
find。 〜/ .gitignore .git / info / exclude -name'* gitignore'-exec cat {} + |减
另外请检查您是否使用了不同的排除文件:
git config -l | grep不包括
core.excludesfile =〜/ .gitignore
您也可以在子文件夹中的子模块中获取该错误,而不是在git项目的根目录下。
感谢 Jon Lin 和 Christopher 帮助我在原始问题中找出这一点。
How can I find the gitignore file and line that is causing a file to be ignored by git?
解决方案
From the repo root, try this:
find . ~/.gitignore .git/info/exclude -name '*gitignore' -exec cat {} + | less
Also check that you're not using a different excludes file:
git config -l | grep exclude
core.excludesfile=~/.gitignore
You can also get that error when you have submodules in a subfolder instead at the git project's root.
Thanks to Jon Lin and Christopher for helping me figure this out on the original question.
这篇关于查找gitignore文件和行,导致文件被git忽略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文