after you execute the command git commit -amend
to amend the commit, then execute git push review HEAD:refs/for/ XXXX
to submit the code to Gerrit, but the commit failed and print out the following prompt:
qidi.huang@droid10$ git push review HEAD:refs/for/xxxx
Writing objects: 100% (1/1), 258 bytes | 0 bytes/s, done.
Total 1 (delta 0), reused 0 (delta 0)
error: unpack failed: error Missing tree a0abf7e9827e74b7d729485fcd3714bc6a1ce898
fatal: Unpack error, check server log
To ssh://[email protected]:29418/kernel/common
! [remote rejected] HEAD -> refs/for/xxxx (n/a (unpacker error))
we can solve this problem by adding the --no-thin
parameter to the submission. In other words, we can use the following command to submit:
$ git push --no-thin review HEAD:refs/for/xxxx
Git push –help) git push –help
--[no-]thin
These options are passed to git-send-pack(1). A thin
transfer significantly reduces the amount of sent data when
the sender and receiver share many of the same objects in
common. The default is --thin.
failure should be analyzed from the log of Gerrit server. I didn’t check the log (as if I didn’t have permission), but according to other colleagues, the problem may be “Gerrit is not compatible with git. This is because when Git is committed, an open review request is generated in Gerrit, but this request does not belong to any of the commits.
[reference]
[1] git flow and gerrit
[2] git push error: unpack failed: index-pack abnormal exit
Read More:
- git push error failed to push some refs to solution
- GitHub upload failed: git push error: failed to push some refs to exception handling
- Git failed to submit data error: failed to push some refs to’https://github.com/XXXXXXX/gif.git’
- ValueError: need more than 0 values to unpack
- [FAQ] after git merge, the push to Gerrit fails, indicating no new changes?
- ValueError: not enough values to unpack (expected 6, got 1)
- ValueError: too many values to unpack
- Git push “fatal: Authentication failed ”
- The pyinstaller settings icon appears“ struct.error : unpack requires a buffer of 16 bytes”
- error occurred during unpacking on the remote end: unpack-objects abnormal exit
- How to solve error: failed to push some refs to ‘[email protected]:……git pull conflict
- Error: improvement of not enough values to unpack (expected 2, got 1)
- Python3-ValueError:not enough values to unpack (expected 2, got 0)
- ValueError: not enough values to unpack (expected 2, got 0)
- Tensorflow error: attributeerror: module ‘tensorflow’ has no attribute ‘unpack’ (‘pack ‘)
- [Git & GitHub] Solution: error: failed to push some refs to’https://github.com/xxxx.git’
- Error occurred when Python called cv2.findcontours: valueerror: not enough values to unpack (expected 3, got 2)
- Git error prompt: fatal: not a git repository (or any of the parent directories):. Git
- Type error: cannot unpack non Iterable non type object appears when starting Bert server in Ubuntu system
- [Git] git pull pull remote git push to remote git commit submit reject