0

I am trying to clone a git repository from the gerrit system, but I encounter an error given below.

$ git clone ssh://gerrit.codereview.com:29418/repo/abc
Cloning into 'abc'...
remote: Counting objects: 109851, done
remote: Finding sources: 100% (23/23)
remote: Total 176120 (delta 0), reused 176113 (delta 0)
Receiving objects: 100% (176120/176120), 7.08 GiB | 30.43 MiB/s, done.
Resolving deltas: 100% (70343/70343), done.
fatal: update_ref failed for ref 'HEAD': cannot update ref 'refs/heads/master': trying to write non-commit object ad3b40d1b582c561edd8a754d029db608f14a98c to branch 'refs/heads/master'

This issue persists across multiple systems. Can you please suggest a solution?

6
  • Check if somenthing gone wrong with git reflog Commented Oct 15, 2024 at 10:09
  • From gerrit server side git reflog didn't return anything. Commented Oct 15, 2024 at 10:11
  • after the clone - is it possible to call git commands in the abc folder, like git fetch, git checkout? Commented Oct 15, 2024 at 12:19
  • @laplasz clone in between it fails with above errors. So after that no abc repository folder available in my local path. Commented Oct 15, 2024 at 13:39
  • This error could be due to master branch corruption; you could try downloading a different branch, like this: git clone ssh://gerrit.codereview.com:29418/repo/abc --branch another-branch and if download will be successful - you can investigate what happens with the master. Commented Oct 15, 2024 at 16:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.