git push error: 无法推送一些引用到XXX

        执行git push命令后,输出以下错误:

Counting objects: 54, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (7/7), 631 bytes | 0 bytes/s, done.
Total 7 (delta 4), reused 0 (delta 0)
remote: Resolving deltas: 100% (4/4)
remote: Processing changes: refs: 1, done    
To ssh://[email protected]:29418/altaapi/sdk/AltaApi
 ! [remote rejected] HEAD -> ref/for/master (prohibited by Gerrit)
error: 无法推送一些引用到 'ssh://[email protected]:29418/altaapi/sdk/AltaApi'
【问题原因】:git push后的branch写法错误,如下:

git push origin HEAD:ref/for/master
【解决方法】:正确写法:

git push origin HEAD:refs/for/master

        仔细看,会发现是refs错些成ref了。

git push error: 无法推送一些引用到XXX_第1张图片










你可能感兴趣的:(开发工具)