Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一棵看起来像这样的树:
--c--c--c--c--c--c--c--c--c1--c2--c3--c4
我想将最后一次提交移动到新分支,如下所示,
--c--c--c--c--c--c--c--c \\\--c1--c2 \\--c3 \--c4
如何将最后一次提交移动到单独的分支?
git checkout -b branch-3 git cherry-pick c3 git checkout -b branch-4 git cherry-pick c4 git checkout master git reset --hard c2