把一段提交搬到新的基点上
git rebase --onto <base> <from> <to> 是「合并与变基」分类下的常用命令,作用是:把一段提交搬到新的基点上。
git rebase --onto <base> <from> <to>
典型用法如下:git rebase --onto main feature old。你可以查看本页上方同组的相关命令,或直接复制到终端运行。
git rebase --onto main feature old