git checkout some-branch~2 # we start from the point where that work was started
git cherry-pick HEAD..some-branch
# that will create 2 new commits with the same stuff as the original 2
# but this is something that has never been merged
git branch something
1条答案
按热度按时间kwvwclae1#
重写分支的历史记录,这样 * 到git*,它就像是从未合并到分支中的工作。假设分支是2次提交:
此分支可以合并到
master
中