简体   繁体   English

Visual Studio在连接时使用TFS GIT错误

[英]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.

相关问题 使用 Visual Studio 2017 克隆 TFS Git 存储库时出现错误 400 - Error 400 when cloning TFS Git repo using Visual Studio 2017 TFS上的Visual Studio 2017推送错误(使用GIT联机运行Visual Studio) - Visual Studio 2017 push error on TFS (visual studio online with GIT) Visual Studio错误推送到远程git-git-tfs迁移 - Visual Studio error pushing to remote git - git-tfs migration Visual Studio 2015和git中的TFS - TFS in visual studio 2015 and git 使用Visual Studio 2015的TFS git clone提供了401个未经授权的错误 - TFS git clone using Visual Studio 2015 gives 401 unauthorized error 使用 Visual Studio 2013 时,用于源代码控制的 TFVC(TFS 版本控制)和 Git 之间的最大区别是什么? - What are the big differences between TFVC (TFS Version Control) and Git for source control when using Visual Studio 2013? Git TFS Visual Studio在没有更改时显示挂起的更改 - Git TFS Visual Studio showing pending changes when there are none 在 Visual Studio 2013 中同时使用本地 Git 和(远程)TFS - Using both local Git and (remote) TFS with Visual Studio 2013 我可以在不使用TFS的情况下在Visual Studio 2013中使用GIT吗? - Can I use GIT with Visual Studio 2013 without using TFS? 将 Git 与 TFS 2017 一起使用 - 适用于 Visual Studio,但不适用于命令行 - Using Git with TFS 2017 - Works in Visual studio but not Command Line
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM