其他分享
首页 > 其他分享> > [remote rejected] HEAD -> refs/for/xx (change https://gerrit.hsaeci.com/50459 closed)

[remote rejected] HEAD -> refs/for/xx (change https://gerrit.hsaeci.com/50459 closed)

作者:互联网

今天 提交代码 review 报如下错误
在这里插入图片描述
网上搜索出现此问题原因是 https://gerrit.hsaeci.com/50459 已不存在,要么是合并了,要么是Abandon 了,下图是发生错误后的git log,注意最后一次提交的 Change-Id
在这里插入图片描述
把 close 后面的网址 https://gerrit.hsaeci.com/50459 在gerrit 里面搜索下,果然此次提交已经被 Abandon了 ,如下图

在这里插入图片描述
在这里插入图片描述
由于最后一次提交的 Change-Id 与 https://gerrit.hsaeci.com/50459 Change-Id 相同,并且https://gerrit.hsaeci.com/50459已经 Abandon 才导致此情况。

解决方案

git commit --amend 后把最后一次提交的 Change-Id 删除,然后再次提交即可。

参考 https://www.cnblogs.com/yongdaimi/p/12583189.html

标签:HEAD,remote,closed,50459,hsaeci,gerrit,https,com,Change
来源: https://blog.csdn.net/weixin_36637758/article/details/118294781