Re: How to create a new commit with the content of some commit?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 12, 2009, 15:59 UTC
- Message-ID
- <7vhbzq8g7u.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <46dff0320905120735l501dcaf4ia8197d24b7684cfe@mail.gmail.com>
Ping Yin <pkufranky@gmail.com> writes:
Show 8 quoted lines
> 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 commitI think with newer git you can say
git reset --merge b
git commitinstead, to save some typing.