-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrebase-pull.txt
37 lines (27 loc) · 1.04 KB
/
rebase-pull.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
37
Initial state:
==============
A - B - C - D - E - F - G - H master
\
\
I - J - K - L feature
Assume both branches are pushed.
REBASE: After git checkout feature; git rebase master
(or git rebase master feature):
=====================================================
A - B - C - D - E - F - G - H master
\
\
I' - J' - K' - L' feature
Now if you try to push without -f you get an error telling you to pull before
pushing. So if you follow that advice...
PULL: git pull
==============
A - B - C - D - E - F - G - H master
\ \
\ \
\ I' - J' - K' - L' - M feature
\ /
\ /
`- I - J - K - L - - - - - - -'
origin/feature
You end up with a merge commit that merges the "old" and the "new" branch.