[Insight-developers] Gerrit for dummies (me)

Brad King brad.king at kitware.com
Thu Apr 14 17:22:59 EDT 2011


On 04/14/2011 04:17 PM, Bill Lorensen wrote:
> It happens to me every once in a while. I want to upload a new patch
> to an existing topic. I do a git rebase -i HEAD~2 and squash the last
> commit. I want the patch to show up with the original topic. Yes, I
> know that I must delete the second change-id from the commit message.
> But, sometimes I forget. So my patch shows up as a new gerrit topic.
> 
> If this is a common mistake (maybe it's just me), then perhaps the
> hook could refrain from adding the second change-id. Or maybe my use
> case is bogus.

Instead of

  $ edit files
  $ git add files
  $ git commit
  $ git rebase -i HEAD~2
  $ git gerrit-push

do

  $ edit files
  $ git add files
  $ git commit --amend
  $ git gerrit-push

-Brad


More information about the Insight-developers mailing list