-
Notifications
You must be signed in to change notification settings - Fork 1
/
rebase-onto.txt
36 lines (27 loc) · 986 Bytes
/
rebase-onto.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Initial state:
==============
A - B - C - D - E - F - G - H master
\
\
I - J - K - L branchA
\
\
M - N - O branchB
EITHER: After git checkout branchB; git rebase master
(or git rebase master branchB):
=====================================================
A - B - C - D - E - F - G - H master
\ \
\ \
\ I' - J' - M' - N' - O' branchB
\
I - J - K - L branchA
OR: After git checkout branchB; git rebase --onto master branchA
(or git rebase --onto master branchA branchB)
================================================================
A - B - C - D - E - F - G - H master
\ \
\ \
\ M' - N' - O' branchB
\
I - J - K - L branchA