Subject: Re: About detached heads

From: Matthieu Moy <[email-masked]>
Date: Fri, 14 Mar 2008 11:48:13 +0100

Wincent Colaiuta <[email-masked]> writes:

> El 14/3/2008, a las 10:46, Geoff Russell escribió:
>
>> This should be simple! I have a series of commits:
>>
>>           1---2---3---4---5
>>
>> I want to go back to 3 but not branch, so I want
>>
>>           1---2---3---4---5---3
>
> How about?
>
>   git cherry-pick the-sha-1-id-of-commit-3

Correct me if I'm wrong, but I believe this will try to re-apply
commit 3 (probably a no-op since commit 3 is already in the history,
perhaps tons of conflicts if 4 and 5 touched the same pieces of code).

The OP wants to keep commit 3, and to revert commits 4 and 5. As
mentionned in other messages, either "git revert" 4 and 5, or just
commit a new revision with the same tree as 3 had.

-- 
Matthieu