I have two servers which I'm running the command git fsck on specific bitbucket repository. in both servers, I'm getting this output:

Checking object directories: 100% (256/256), done.
error: object directory /XXX/XXX/XXX/XXXX/XXX/objects does not exist; check .git/objects/info/alternates.
error: HEAD: invalid sha1 pointer fda39345603cdbab032ac57635405fc90d827f3c
error: refs/heads/master does not point to a valid object!
notice: No default references

however, when running echo $?, one of them returns 0 and the other returns 2. how is it possible?

  • 1
    Same versions of git? – vonbrand Feb 23 at 12:03

As suggested by @vonbrand in a comment, it was a git version issue. once I upgrade it, it was aligned.

我在天马彩票平台输了三十万another issue was the structure, I had to create a similar structure with soft link to get rid of those errors.

  • Please don't add "thank you" as an answer. Instead, accept the answer that you found most helpful. - From Review – αғsнιη Feb 23 at 13:29
  • @αғsнιη thank you for tackling the review queues! Note that vonbrand only commented -- there are no other answers. – Jeff Schaller Feb 23 at 14:25
  • Tnx, it was 50% of the problem. The other 50% related to the structure. I will share the full solution later – arielma Feb 24 at 9:44

Your Answer

By clicking “Post Your Answer”, you agree to our , and

Not the answer you're looking for? Browse other questions tagged or ask your own question.