One thing you need to take care of before pushing your changes to Gerrit is that you have the commit-msg hook setup in your local repository. This will add a Change-Id to your commit message that Gerrit will then use to make sure your second push is a second patchset to your first change and not a new change. It is recommended that you setup your repository in such a way that pushed will be rejected if no Change-Id is found in your commit message
how the git commit --amend working together with gerrit?
-
01-06-2022 - |
Pregunta
I staged and committed 5 files and pushed it gerrit, but before it is merged in to git, I updated 3 of them then I git commit --amend to the last commit, and if I do push to gerrit again, does this second path contains the updates in the other two files?
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow