简体   繁体   English

Git忽略yml文件

[英]Git is ignoring yml file

I am facing with a strange issue. 我面临一个奇怪的问题。 I have private git repo. 我有私人git回购。 In that if I add a new .yml file then git is ignoring that file but If I add any other file then it's recognising it. 在这种情况下,如果我添加一个新的.yml文件,则git会忽略该文件,但是如果我添加任何其他文件,则它会识别该文件。

There is no .gitignore file in the repo. 库中没有.gitignore文件。

One of my colleague tried to add .yml file in that repo and he is able to do it. 我的一位同事尝试在该存储库中添加.yml文件,他能够做到。

Therefore issue is specific to my system. 因此,问题是特定于我的系统的。 I could not think anything other than a .gitignore file will do it. 除了.gitignore文件之外,我无法想到其他任何方法。 ( I even deleted the repo and clone it again but no luck) (我什至删除了存储库并再次克隆它,但是没有运气)

Can someone please share some guidance about this bizzard issue. 有人可以分享一些有关此暴雪问题的指南。 Where to look at it / what to look at etc? 在哪里看/看什么?

Use 采用

git check-ignore -v file.yml

to find out if there is an ignore pattern that ignores the file and from what file the pattern comes. 以确定是否存在忽略模式,该模式会忽略文件以及该模式来自哪个文件。 It could be .git/info/exclude or global .gitignore. 它可以是.git/info/exclude或全局.gitignore。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM