Re: How to create a new commit with the content of some commit?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 12, 2009 at 11:59 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Ping Yin <pkufranky@xxxxxxxxx> writes:
>
>> a----b
>>  \----c
>>
>> Given the graph above, I want to create a commit b1 on top of c, where
>> b1 and b have the same content. i.e.
>>
>> a----b
>>  \----c----b1    ( content(b) == content(b1) )
>
> On "c", you can:
>
>    git read-tree -m -u b
>    git commit

is -u necessary?

>
> I think with newer git you can say
>
>    git reset --merge b
>    git commit
>

When the working directory is clean, it seems "reset --hard" and
"reset --merge" behave the same. So after "git reset --merge b",  the
HEAD is moved to b, and i have nothing to commit.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]