git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to create a new commit with the content of some commit?
@ 2009-05-12 14:35 Ping Yin
  2009-05-12 15:47 ` Ping Yin
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Ping Yin @ 2009-05-12 14:35 UTC (permalink / raw)
  To: git mailing list

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) )

If there are no untracked files in the working directory, i can do

git checkout b
git reset c
git add .
git commit -m "the copy of b"

Is there any simpler way? And if there are untracked files in the
working directory, how to do it?



Ping Yin

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-05-13 14:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-12 14:35 How to create a new commit with the content of some commit? Ping Yin
2009-05-12 15:47 ` Ping Yin
2009-05-12 16:04   ` Tomas Carnecky
2009-05-13 14:36     ` Sitaram Chamarty
2009-05-12 15:59 ` Junio C Hamano
2009-05-12 16:38   ` Ping Yin
2009-05-12 16:07 ` Jeff King
2009-05-12 16:43   ` Ping Yin
2009-05-12 16:51     ` Jeff King
2009-05-12 16:59       ` Ping Yin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).