1. 程式人生 > >git常用命令2--- git rebase

git常用命令2--- git rebase

過程 checkout nbsp 常用 check mit 另一個 ups pst

git rebase:簡單而言就是把某個分支上的提交commit嫁接到另一個commit的後面,在這個過程中這些commit的base相對就改變了,也就叫變基。

git rebase <upstream> <branch>

如果提供了branch會首先checkout到這個branch上,然後再進行rebase操作;

git rebase master topic

git rebase master

git rebase --onto <newbase> <upstream> <branch>

git常用命令2--- git rebase