[Insight-developers] Cherry picking

Bill Lorensen bill.lorensen at gmail.com
Fri Jul 8 13:25:09 EDT 2011


I think I used to know that, but do it so infrequently I forgot it...

On Fri, Jul 8, 2011 at 12:23 PM, David Cole <david.cole at kitware.com> wrote:
> "git reset --hard" without any commit or branch/tag name specified simply
> resets your working tree to match the last commit at HEAD... (which in your
> case includes the cherry-pick and any other commits beyond origin/master you
> were trying to recover from)
>
> If you name "origin/master" or any other branch then it should reset you to
> the commit at that branch location, and also make your working tree match
> that commit.
>
> Hopefully this is helpful at least for future reference.
>
> Remember, "git is like coffee" (except that I liked my very first cup of
> coffee... perhaps I'm unusual in that respect ;-)
>
>
> Cheers,
> David C.
>
>
> On Fri, Jul 8, 2011 at 11:50 AM, Bill Lorensen <bill.lorensen at gmail.com>
> wrote:
>>
>> I tried
>> git reset --hard
>> but not
>> git reset --hard origin/master
>>
>> After I picked it said my master was ahead by X commits.
>>
>> I think I should have first:
>> git checkout -b foobranch
>> then a cherry pick.
>>
>> On Fri, Jul 8, 2011 at 11:47 AM, David Cole <david.cole at kitware.com>
>> wrote:
>> > With master checked out, you should be able to simply:
>> >
>> >   git reset --hard origin/master
>> >
>> > To get back to a sane state after a mishap like you've described... Did
>> > you
>> > try that?
>> >
>> >
>> > On Fri, Jul 8, 2011 at 11:38 AM, Bill Lorensen <bill.lorensen at gmail.com>
>> > wrote:
>> >>
>> >> Brad,
>> >>
>> >> I blindly tried to cherry pick a gerrit patch and messed up my repo.
>> >> It picked into my master and I could not get back to a clean state.
>> >>
>> >> It's been a while since I cloned. About time anyway...
>> >>
>> >> Back to my old workflow.
>> >>
>> >> Bill
>> >> _______________________________________________
>> >> Powered by www.kitware.com
>> >>
>> >> Visit other Kitware open-source projects at
>> >> http://www.kitware.com/opensource/opensource.html
>> >>
>> >> Kitware offers ITK Training Courses, for more information visit:
>> >> http://kitware.com/products/protraining.html
>> >>
>> >> Please keep messages on-topic and check the ITK FAQ at:
>> >> http://www.itk.org/Wiki/ITK_FAQ
>> >>
>> >> Follow this link to subscribe/unsubscribe:
>> >> http://www.itk.org/mailman/listinfo/insight-developers
>> >
>> >
>
>


More information about the Insight-developers mailing list