这是我在执行 $ git stash pop
时遇到的唯一冲突
它是文件的最后一行,并且最后一行都没有任何换行符。
这是我对 git 不了解还是有 bug。
Git版本1.7.12
最佳答案
这似乎与'git: merge conflicts over newline at end of file一致',典型情况是将 core.autocrlf
设置为 false
(我推荐),而不是“native
”。
请注意, merge 不会忽略这些 eol 差异(请参阅“Is it possible for git-merge to ignore line-ending differences? ”)。
如果您希望自动完成这些 eol 转换,那么您可以考虑 .gitattributes
设置,如“Distributing git configuration with the code ”中所述。
关于git - 当两个文件相同时,为什么 git 会向我显示此冲突?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13118743/