[英]Visual Studio using TFS GIT error when connecting
I've been using VS 2013, ad have been successfully connected to our in-house Team Foundation Server for the last several months. 我一直在使用VS 2013,过去几个月广告已成功连接到我们的内部Team Foundation Server。
My machine lost power, then on rebooting I can now not connect to the server. 我的机器断电,然后在重新启动时我现在无法连接到服务器。
I receive the error below 我收到以下错误
An error occurred. Detailed message: An error was raised by libgit2.
Category = Reference (Error). Corrupted loose
reference file: refs/remotes/origin/master
I can, in the command line, switch between branches just fine - though not sure if thats switching my local version? 我可以,在命令行中,在分支之间切换就好了 - 虽然不确定那是否会切换我的本地版本? - pretty new to GIT. - 对GIT来说很新鲜。
When i look at the files, 'Development' and 'Master' in my .git/repo folder the master one has an empty string (i can highlight a bunch of spaces) - the development one is just fine and has a guid in place. 当我查看我的.git / repo文件夹中的'开发'和'主'文件时,主文件有一个空字符串(我可以突出显示一堆空格) - 开发一个就好了并且有一个guid到位。 Is this the issue? 这是问题吗? if so, how do i rectify it? 如果是的话,我该如何纠正呢?
How can I rectify the above error - or even find out what it actually means? 如何纠正上述错误 - 甚至找出它实际意味着什么?
The file containing the branch information on your server has become corrupted. 包含服务器上的分支信息的文件已损坏。
Delete the file .git/refs/remotes/origin/master
then fetch from your server to recreate it. 删除文件.git/refs/remotes/origin/master
然后从服务器获取以重新创建它。
The easiest way to solve the problem may be to remove the corrupt repository. 解决问题的最简单方法可能是删除损坏的存储库。 You can simply delete your local Git repo and clone the server again. 您只需删除本地Git仓库并再次克隆服务器即可。
Note: If you have edits you have not pushed they will be lost. 注意:如果您进行了编辑,则表示您没有进行编辑,它们将会丢失。 You can just back these up if they are not large edits. 如果它们不是大型编辑,您可以将它们备份。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.