GitX-L: missing object 0000000000000000000000000000000000000000

I get the following error in GitX-L when opening a git repository:

The document "REPO_NAME" could not be opened. An error occured while trying to open file://localhost/Volumes/SERVER/www/REPO_NAME/.git/. fatal: missing object 0000000000000000000000000000000000000000 for refs/remotes/origin/HEAD 

Does anyone know what causes this problem or how to fix it? I am not getting an error when using the command line, so I assume this is a problem with GitX-L.

git fsck will tell me about a bunch of dangling records, can they be to blame?

+4
source share
3 answers

I had the same error message when opening the repository in "GitX" (GUI tool).

For me, the problem was caused by the .git/refs/remotes/origin/HEAD file, which referred to a remote branch that I deleted:

 ref: refs/remotes/origin/develop 

I fixed it by editing the file to contain the name of the name of the remote branch that still exists:

 ref: refs/remotes/origin/master 
+8
source

There seems to be something wrong with the remote removal of ref ... Remove the culprit from the terminal using git branch -r -d origin/HEAD or even git remote prune origin and reopen it in GitX.

+2
source

I had the same problem.

A simple solution is to clone the failed repository and start using the clone instead. It worked for me.

+1
source

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


All Articles