1 Move base downstream
Move the base downstream, the root node is the intersection of the two branches
1. Initialize the data
* c54f8b7 (HEAD -> b) version3 b
| * f9fc6be (a) version4 a
| * 730cb6a version3 a
|/
* 604ad92 version2 //a和b的交点,既base
* 648ef5e version1
2.rebase change base
At this time HEAD is on branch b, we can now base is version2, we can change the base of branch b to any position of version1~4, assuming rebase to version3 a
git rebase 730cb6a
Equivalent graphics operations are used here
1)
2) Handle conflicts
3). Fill in the submission information
3. As a result
, the base of branch b has changed
2 Move base upstream
Move base upstream, base is the designated upstream commit point
Suppose that you want to move to version2 and
version2 is base. In this way, branch b will have two commits, verson3 a and version 3 b.
If you want to restore to the original state, you can Action
change version3 a skip
to