From: Sitaram Chamarty Date: Wed, 13 May 2009 14:36:15 GMT Subject: Re: How to create a new commit with the content of some commit? Message-ID: In-Reply-To: <83048193-FBD1-4D14-9CC9-B95BD08C67F7@dbservice.com> On 2009-05-12, Tomas Carnecky wrote: > > On May 12, 2009, at 5:47 PM, Ping Yin wrote: > >> On Tue, May 12, 2009 at 10:35 PM, Ping Yin >> wrote: >>> 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) ) >> >> More precisely, b1 and b point to the same tree object > > git checkout c > git cherry-pick b I do not think this does what was wanted. Applying the change from a->b onto c may not give you "b" unless a==c.