gh-issues icon indicating copy to clipboard operation
gh-issues copied to clipboard

Support semi-linear merge strategy

Open waldyrious opened this issue 6 years ago • 3 comments

(originally reported in https://github.com/isaacs/github/issues/1017)

Currently, using the "rebase and merge" option on a pull request will merge the branch using the fast-forward option. This is sometimes called a "linear history" model. The semi-linear model would be equivalent to rebasing the PR branch and then merge it as per the normal merge option (which always creates a merge commit, even if the merge could be fast-forwarded).

The motivation for this model is described in several places, of which I'd highlight A tidy, linear Git history. I took the liberty to slightly edit the diagram from that post, to add a pure linear workflow to the diagram. I think this conveys nicely the differences between merge vs. rebase && merge --ff-only (linear) vs. rebase && merge --no-ff (semi-linear):

git history diagrams

Of course, such a workflow can be implemented via the command line, or using third-party tools, but since GitHub already supports multiple merge strategies (merge, rebase and merge, squash), it seems sensible to natively support this additional option in the web UI.

FYI, GitLab has already implemented this, and ~~it's been requested for Bitbucket as well (in #12914 and #17881, as well as several comments in #6106)~~ so has Bitbucket.

waldyrious avatar Feb 26 '19 10:02 waldyrious

Any updates on this?

shrabas avatar Mar 20 '20 12:03 shrabas

Any updates on this? :)

BleedingDev avatar Nov 14 '22 22:11 BleedingDev