简体   繁体   中英

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.

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.

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. 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.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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