[Insight-developers] Basic git/gerrit question
    M.Staring at lumc.nl 
    M.Staring at lumc.nl
       
    Tue Apr 26 08:11:13 EDT 2011
    
    
  
Hi Gaetan,
Thanks, that solved it.
Marius
-----Original Message-----
From: Gaëtan Lehmann [mailto:gaetan.lehmann at jouy.inra.fr] 
Sent: dinsdag 26 april 2011 13:56
To: Staring, M. (LKEB)
Cc: insight-developers at itk.org
Subject: Re: [Insight-developers] Basic git/gerrit question
Le 26 avr. 11 à 12:37, <M.Staring at lumc.nl> a écrit :
> Hi all,
>
> I recently did a gerrit review. I pulled the change into my local repo 
> by doing:
>
> git pull http://review.source.kitware.com/p/ITK refs/changes/39/1339/1
>
> Now, I have done this review, and want to get rid of the changes 
> again. How do I do that?
>
> git status says:
>
> $ git status
> # On branch master
> # Your branch is ahead of 'origin/master' by 5 commits.
> #
> nothing to commit (working directory clean)
Hi,
You can use
   git reset --hard HEAD~5
to remove the commit you've pulled.
It's generally easier to use the "checkout" command provided by git, because it doesn't pull the changes in your master branch.
   # get the commits proposed by this gerrit change
   git fetch ssh://glehmann@review.source.kitware.com:29418/ITK refs/
changes/39/1339/2 && git checkout FETCH_HEAD -b compositetx
   # test, test, test
   # go back to master and remove the branch used for the test
   git checkout master
   git branch -D compositetx
Regards,
Gaëtan
--
Gaëtan Lehmann
Biologie du Développement et de la Reproduction INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr  http://www.itk.org http://www.mandriva.org  http://www.bepo.fr
    
    
More information about the Insight-developers
mailing list