小编Azi*_*ese的帖子

如何通过压缩提交进行变基

我有一些看起来像这样的东西

                6---7 (currentBranch)
               /
      3---4---5---8 (initialBranch)
     /
1---2 (master)
Run Code Online (Sandbox Code Playgroud)

我将initialBranch合并到master中,所以现在master看起来像

1---2---9 where commit '9' is commits 3+4+5+8 squashed together
Run Code Online (Sandbox Code Playgroud)

我的最终目标是在远程存储库中重新设置 currentBranch 的基础,使其看起来像

          6---7 (currentBranch)
         /
1---2---9
Run Code Online (Sandbox Code Playgroud)

我需要运行哪些命令来完成此任务?

git rebase

5
推荐指数
1
解决办法
622
查看次数

标签 统计

git ×1

rebase ×1