存储库中的全局.gitignore与.gitignore

SJS*_*SJS 3 git github

如果我有一个全局.gitignore设置,并且项目在repo中有.gitignore,则repo中的那个覆盖全局或者它是否添加规则示例:

如果全球有:

*.exe
*.ini
Run Code Online (Sandbox Code Playgroud)

回购有:

*.ini
*.co
Run Code Online (Sandbox Code Playgroud)

*.exe会进入项目吗?

161*_*903 6

这两种gitignores适用.所以在这种情况下,.exe不会进入项目.

但是,如果您!*.exe在本地存储库gitignore中,.exe文件将进入存储库.

GitHub有一篇关于这个主题的好文章:https://help.github.com/articles/ignoring-files