Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top