git - 查找导致文件被 git 忽略的 gitignore 文件和行

标签 git

<分区>

如何找到导致文件被 git 忽略的 gitignore 文件和行?

最佳答案

从 repo root,试试这个:

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

同时检查您没有使用不同的排除文件:

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

can also get that error when you have submodules in a subfolder instead at the git project's root .

感谢Jon LinChristopher帮助我在 original question 上解决这个问题.

关于git - 查找导致文件被 git 忽略的 gitignore 文件和行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11764439/

相关文章:

ios - Xcode CI 和 cocoapods 私有(private)仓库

git - 无法在 XCode 4.6 中拍摄快照或使用 git

git - 如何摆脱 git 分支/pull 请求中不需要的更改?

linux - Git失败,出现libcharset.so.1

git - 自动更新 package.json 版本

git - 在 Pull 请求后 rebase

Git:即使我已经解决了冲突也无法提交文件

git - 如果你已经 fork 了一个 repo 并且你是 fork 的唯一用户,那么在推送之后 rebase 是否可以?

swift - 版本控制系统未提供作者信息

c# - 删除 GIT 中的一些提交