The difference between the two kinds of merge are only different in the commit history (as you showed the logs in graph).
Let's illustrate by graphs. Assume the commit history as below before merging:
A---B---C---D master
E---F---G develop
Merge commit (multiple parents):
The command used is git merge branchname
. It's the default way to merge two branches.
When you merge develop
branch into master
branch by Merge commit in SmartGit (git merge develop
), the commit history will be:
A---B---C---D---M master
/
E---F---G develop
Simple commit (one parent, "squash"):
It merges two branches with --squash
option, the command used is git merge branchname --squash
.
--squash
Produce the working tree and index state as if a real merge happened (except for the merge information), but do not actually make
a commit, move the HEAD, or record $GIT_DIR/MERGE_HEAD (to cause the
next git commit command to create a merge commit). This allows you to
create a single commit on top of the current branch whose effect is
the same as merging another branch (or more in case of an octopus).
When you merge develop
branch into master
branch by simple commit in SmartGit (git merge develop --squash
), it get the changes from develop
branch into master
branch as a new ordinary commit (as if a real merge happened), and the commit history will be:
A---B---C---D---M master
E---F---G develop
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…