git push when commit --amend is done

妖精的绣舞 提交于 2019-12-11 19:13:18

问题


I have done the following

  1. git commit
  2. git push origin HEAD:refs/for/master

I have received message similar to below:

remote: Resolving deltas: 100% (8/8)
remote: Processing changes: new: 1, refs: 1, done    
remote: 
remote: New Changes:
remote:   https://gerrit.ericsson.se/abcde
remote: 
To ssh://gerrit.ericsson.se:29418/platform/cpp/control.git
 * [new branch]      HEAD -> refs/for/master
  1. Now in gerrit review I have received comments to change logic so did
  2. git commit --amend

Now my question is if I again dogit push origin HEAD:refs/for/master [after git commit --amend] Do I get new gerrit link?

If yes, is there any way that my changes get reflected in my old gerrit link?


回答1:


As long as you do not remove the Change-Id line from the commit message, Gerrit will group the new commit to the old issue. (see also manual)



来源:https://stackoverflow.com/questions/21905670/git-push-when-commit-amend-is-done

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!