01、$ git checkout experiment
$ git rebase master
将当前分支变基到master分支
原理:首先找到两个分支的最近共同祖先C2,然后对比当前分支相对于该祖先的历次提交,提取相应的修改并存为临时文件,然后将当前分支指向目标基底C3, 最后以此将之前另存为临时文件的修改依序应用。
快速合并
$ git checkout master
$ git merge experiment
02、变基和直接merge的区别
变基时,master分支提交历史是串行的,提交历史更加整洁。