Visual studio - git pull causes error

扶醉桌前 提交于 2019-12-01 22:58:10
Edward Thomson

There is a bug in Visual Studio 2013 through Update 3 that will prevent you from merging in certain circumstances when you have core.autocrlf set to true yet the files in your repository are incorrectly normalized. We are comparing the contents of your working folder (which has Windows-style '\r\n line endings) to the contents of your repository, which you have claimed (by setting core.autocrlf=true) have Unix style \n line endings.

If, in fact, your repository contains files with \r\n line endings, then we will incorrect report these files as modified in your working directory and prevent the merge. (We should, of course, be looking at the timestamp in the index and not bothering to test these files at all.)

While this is a bug in Visual Studio (and will be fixed in the next Update), it is obscuring the fact that your repository is not configured correctly. You should configure a .gitattributes file and correct the line endings in your repository to avoid these sorts of problems.

In the meantime, you can use Git for Windows on the command-line to solve this problem, please be sure to configure alternate credentials in Visual Studio Team Services.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!