-
Notifications
You must be signed in to change notification settings - Fork 1
/
merge-vs-squash.txt
42 lines (29 loc) · 1.02 KB
/
merge-vs-squash.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
38
39
40
41
42
Initial state:
==============
A - B - C - D - E - F - G - H master
\
\
I - J - K - L feature
SQUASH: After git checkout master; git merge --squash feature
==============================================================
A - B - C - D - E - F - G - H - N master
\
\
I - J - K - L feature
N is a combination of I, J, K and L (they are squashed)
After git branch -D feature:
============================
A - B - C - D - E - F - G - H - N master
MERGE: After git checkout master; git merge feature:
====================================================
A - B - C - D - E - F - G - H - M master
\ /
\ /
I - J - K - L feature
After git branch -D feature:
============================
A - B - C - D - E - F - G - H - M master
\ /
\ /
I - J - K - L
M is merge commit. From there you can look at I, J, K and L