Git Error Missing Error

Recently, we changed the location of the repository, and we found that there is no monthly commit in the files. The old server on which we had Git on is disabled, so there is no way to restore the commit there.

Here is the error I get:

$ git fsck --full
broken link from commit 58ba71d080b1814420bce09c4e505b323fd9cb58
to commit a2e2bde363032b7609616a3152fe048cc5c83715

missing commit a2e2bde363032b7609616a3152fe048cc5c83715

Is there anything that can be done to fix this? Thanks!

+4
source share
2 answers

Each clone has a full history, so everyone who worked on this project after posting the commit should have it on their computer. Take a look at any working directory for the commit, then add its packages and objects (the contents of the .git/objects directory) to the broken repository (only files that do not exist), fsck again and repack.

It is not possible to restore an object unless you find it anywhere.

+8
source

Remove the .git directory from the application directory. Create a new one using "git init" inside the application root directory and continue with

 "git add ." "git commit -m your comment" "git push origin master" 

Hope it works !!!

-7
source

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


All Articles