问题
I have done the following
git commit
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
- Now in gerrit review I have received comments to change logic so did
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