6

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?

1
  • Why the down vote? Perfectly legitimate question, no? Commented Sep 20, 2014 at 15:04

2 Answers 2

8

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.

Sign up to request clarification or add additional context in comments.

2 Comments

This worked for me. I just had to to sync my local copy after doing this
This worked for me aswell. After deletion, I used 'Fetch' in order to sync the latest changes.
0

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.