Visual Studio using a TFS GIT error when connecting

I use VS 2013, the ad has been successfully connected to our internal Team Foundation Server over the past few months.

My machine lost power, and then when I reboot, now I can’t connect to the server.

I get 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, on the command line, switch between branches just fine - although not sure if this will switch my local version? - quite new to GIT.

When I look at the "Development" and "Master" files in my .git / repo folder, the host has an empty line (I can highlight a bunch of spaces) - one of them is beautiful and has a guid in place. This is problem? if so, how to fix it?

How can I fix the above error or even find out what it actually means?

+6
source share
2 answers

The file containing the branch information on your server is corrupt.

Delete the .git/refs/remotes/origin/master file, then extract it from the server to create it.

+8
source

The easiest way to solve the problem is to delete the damaged repository. You can simply delete the local Git repository and clone the server again.

Note. If you have changes that you have not clicked, they will be lost. You can simply return them if they are not big changes.

0
source

Source: https://habr.com/ru/post/975551/


All Articles