You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rebase 变基,它的原理是首先找到这两个分支的最近共同祖先,然后对比当前分支相对于该祖先的历次提交,提取相应的修改并存为临时文件,然后将当前分支指向目标基底, 最后以此将之前另存为临时文件的修改依序应用。
遵守一条金科玉律:“不要对在你的仓库外有副本的分支执行变基”。 rebase -i 操作可以将多次commit合并为一次commit以去掉冗余的commit记录。
在sourcetree上,若要将feature分支的更改 合并到dev上,需要先checkout到dev,然后在feature上 右击 -> 将当前变基变更到feature;或者先在feature分支上 rebase dev,然后再checkout dev 并merge feature。