Does Github.com have to create a merge commit when you merge from a fork ?
Posted
by
Nishant
on Stack Overflow
See other posts from Stack Overflow
or by Nishant
Published on 2013-11-03T09:50:21Z
Indexed on
2013/11/03
9:53 UTC
Read the original article
Hit count: 316
I cloned the master and started doing he my work . Due to permissions I push the branch to my fork . I then sent a pull request to my master and someone with permission does the merge . I notice that Github.com creates a merge commit snapshot which to me looks like just a diff of the entire changes which is actually not necessary but helpful in the sense I can just look at merge commit to see the entire diff . I can see the same sha has as my own branch - hence it looks like the merge is an extra commit which probably aint nexeccary since its a fast forward ?
master - a
myfork(computer) - a->b->c
myfork(github) - a->b->c
Pull request myfork - master (which it says I can automatically merge) shows the entire diff and then when I merge it , it shows up as
master - a->b->c-d
. The d is a merge commit which I think it not really required because it is a fast forward ? Can someone explain why does this happen ? I think this is the same scenario if I rebase master if master had gone ahead , but that has not happened . Master is still at when I merge .
© Stack Overflow or respective owner