git rebase

将 commits 从一个分支合并到另一个分支上。 常用于跨分支的 commits 合并,在被合并分支的最头部构建新的 commit,表示合并完成。 更多信息:https://git-scm.com/docs/git-rebase.

git rebase {{目标分支}}

git rebase {{[-i|--interactive]}} {{目标分支或 commit 的 hash}}

git rebase --continue

git rebase --skip

git rebase --abort

git rebase --onto {{目标分支}} {{当前分支}}

git rebase {{[-i|--interactive]}} {{HEAD~5}}

git rebase {{[-X|--strategy-option]}} theirs {{分支名称}}