Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 501
Darren Wainwright Avatar asked Sep 19 '14 19:09

Darren Wainwright


1 Answers

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.

like image 162
Edward Thomson Avatar answered Sep 19 '22 00:09

Edward Thomson