0

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?

Martin G
  • 17,357
  • 9
  • 82
  • 98
user2131316
  • 3,111
  • 12
  • 39
  • 53

1 Answers1

2

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

uncletall
  • 6,609
  • 1
  • 27
  • 52