In a branch, say, there are 25 commits: A <- B <- C ... X <-Y
. I once reverted C
to Y
in a batch commit by:
git revert -n C^..Y git commit -a -m "xxx"
This would be a new big commit Z
which reverts C
to Y
.
Then I need to redo C
to F
due to some reason. I tried:
git cherry-pick C^..F
But I got this message:
Already up to date! The previous cherry-pick is now empty, possibly due to conflict resolution.
No change to my work space or git log. I think the reason is that, C
to F
are already in this branch, so cherry-pick just ignores them though the last commit Z
had reverted C
to Y
. What's the right way to recommit C
to F
?
没有评论:
发表评论