Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

On git push I got error: error: invalid protocol: wanted 'old new ref'

I have branch x. I type git push origin x:y

I got error message

error: error: invalid protocol: wanted 'old new ref'
fatal: internal server error
fatal: The remote end hung up unexpectedly
Counting objects: 140, done.

Maybe it is imporant: when I cloned repository, for performance I used switches

-b master --single-branch

git version 2.6.2.windows.1

gerrit version 2.9.4

like image 572
michaldo Avatar asked Sep 15 '26 18:09

michaldo


1 Answers

When I decided to final investigation of the issue, it revealed that

git fetch --unshallow

solves the problem.

(Solves means allows push a branch, not push branch with shallow clone)

like image 80
michaldo Avatar answered Sep 18 '26 11:09

michaldo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!