git error unpack failed missing blob on git review to gerrit

alexander balzer picture alexander balzer · Oct 28, 2014 · Viewed 9.4k times · Source

Hey I keep getting these errors randomly with some of the work I am doing. Normally I will edit a repo after a code review and then run the following commands.

git add .
git commit --amend
git review

then I sometimes get this error

error: unpack failed: error Missing blob c7eb8a2bcbe57f7f134819fbe6e2975b04b2e548
fatal: Unpack error, check server log
To ssh://[email protected]:29418/wns/chef/splunk-hop
 ! [remote rejected] HEAD -> refs/publish/develop (n/a (unpacker error))
error: failed to push some refs to 'ssh://[email protected]:29418/wns/chef/splunk-hop'

Any ideas? Is it something I am doing or is it the server I am pushing it to?

Answer

obrienk picture obrienk · Dec 2, 2015

I had this problem today and tried all the suggestions. Finally the solution was very simple:

  • Switch to another branch (e.g. develop).
  • Pull from the remote repository
  • Switch back to your new branch and push.

With any luck it'll work now.