user2131316
user2131316

Reputation: 3277

how the git commit --amend working together with gerrit?

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?

Upvotes: 0

Views: 635

Answers (1)

uncletall
uncletall

Reputation: 6842

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

Upvotes: 2

Related Questions