How to create a new commit with the content of some commit?
- From
Ping Yin <pkufranky@gmail.com>
- Date
- May 12, 2009, 14:35 UTC
- Message-ID
- <46dff0320905120735l501dcaf4ia8197d24b7684cfe@mail.gmail.com>
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