jongchul
jongchul

Reputation: 77

Update patchset

On gerrithub (http://gerrithub.io/) I committed patchset1 and want to update it to patchset2.

[procesdure]

  1. git add test.cpp
  2. git commit -m "commit -1"
  3. git push https://[email protected]/username/testproject HEAD:refs/for/master

for patchset2

  1. git add test.cpp
  2. git commit --amend
  3. same as 3.

but there was another new commit on gerrithub site. How can i make patchset2?

Upvotes: 2

Views: 1822

Answers (1)

Magnus Bäck
Magnus Bäck

Reputation: 11571

If you want Gerrit to automatically correlate amended commits to the originally uploaded changes (i.e. create new patch sets when you upload a new version of a change), make sure your commits have the Change-Id commit message footer set. This is easily done with a commit-msg hook.

Another option is to push the amended commit to refs/changes/123, where 123 is the sequential change number that each change is assigned.

Relevant Gerrit documentation links:

Upvotes: 2

Related Questions