[vtk-developers] git gerrit help

Dean Inglis inglis.dl at gmail.com
Fri Aug 30 11:26:44 EDT 2013


thanks for your patience David.  Didn't see the forest for the trees kind
of thing:
the fetch and checkout commands on gerrit were there the whole time.
git commit --amend isn't discussed in Wiki/VTK/Git/Develop and so I
wasn't aware of it, and now the meaning and purpose of Change-Id is clear.
- Dean


On Fri, Aug 30, 2013 at 11:01 AM, David Gobbi <david.gobbi at gmail.com> wrote:

> Hi Dean,
>
> If you've deleted your local topic branch, then the best way to start
> is to check it out again from gerrit, e.g. by using the "check out"
> link on the gerrit page:
>
> git fetch http://review.source.kitware.com/p/VTK refs/changes/47/12247/1
> git checkout FETCH_HEAD -b med-image-props-fix
>
> Then you can amend it by:
>
> 1) editing the file(s)
> 2) "git add" the files
> 3) git commit --amend
>
> The only thing that gerrit needs to identify the change is a
> "Change-Id" line in the change log, which for this change is the
> following:
>
> Change-Id: Iccc5a31629d09a143e3712ba9c936528ef868afc
>
> This is not a git SHA.  This is specific to gerrit.  So it is not
> something that you can find by using git reflog or any other git
> commands.  Whenever you amend a change, you must make sure
> that the Change-Id in the commit stays the same.  The commit SHA
> can change, but the gerrit Change-Id must stay the same.
>
> If you ran VTK/Utilities/SetupForDevelopment.sh when you started
> working with VTK git, then a Change-Id line should automatically be
> added to each commit that you make.  If not, every time you revise a
> change you should go to the gerrit page for that change to get the
> Change-Id.
>
>  David
>
>
> On Fri, Aug 30, 2013 at 8:41 AM, Dean Inglis <inglis.dl at gmail.com> wrote:
> > Hi,
> >
> > being fairly new to git and especially vtk gerrit, I messed up
> > responding to a code review: the git response ended up as an
> > additional code review instead of amending to the one originally
> > sent to gerrit.  I deleted my local topic branch and
> > I'd like to just start again (amend the original gerrit commit)
> > but am not sure how to proceed.
> > On vtk gerrit there is the SHA id of the first commit
> > and if i do git reflog on my local copy, I have other information
> > that would enable me to set git HEAD, just not sure
> > which one to select.
> >
> > regards,
> > Dean
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20130830/289bd775/attachment.html>


More information about the vtk-developers mailing list