GitHub merge button uglifies your history

Others already have written lengths about it, but yesterday I saw it again in the code of PEAR's Mail_mime package: An ugly and unreadable git history, caused by simply using the GitHub "Merge pull request" button.

History written by the "Merge pull request" button

GitHub uses --no-ff to create merge commits. Those are unnecessary for most pull requests, especially those with a single commit.

Apart from that, it does not rebase the PR when merging, and it does not squash.

The result is what you see here - simply clicking "merge" on five simple pull requests:


|\  
| * e5be21c Get rid of @-operator, better variables naming 
| * ca1d161 Fix path to pinentry-cli.xml file on composer installs (Bug #20527) 
* |   39ee090 Merge pull request #13 from alecpl/fix_19914 
|\ \  
| * | 51ba6e1 Get rid of @-operator, better variables naming 
| * | 18ecf59 Fix issue where PinEntry could not find Console/CommandLine (Bug #19914) 
| |/  
* | 57ea8c3 adopt package.xml to test file renamings 
* |   7f83425 Merge pull request #12 from alecpl/fix_20512 
|\ \  
| * | c2965cb Fix converting HTML entities in debug output (Bug #20512) 
| |/  
* |   557ab17 Merge pull request #14 from alecpl/fix_17815 
|\ \  
| * \   bb42e1e Merge branch 'fix_17815' of github.com:alecpl/Crypt_GPG into fix_17815 
| |\ \  
| | * | 3abdafb Fix key import tests after adding 'fingerprints' item to the result 
| * | | 57ccba0 Fix key import tests after adding 'fingerprints' item to the result 
| |/ /  
| * | a6cbcd0 Return all fingerprintes from key import methods (Request #17815) 
| |/  
* |   e5ea0df Merge pull request #15 from alecpl/fix_typos 
|\ \  
| |/  
|/|   
| * 33e3c94 Fix typos in variable names 
|/  
* c340099 make tests run on travis-ci.org ]]>

Pretty history

Compare this with the history of my JsonMapper repository, in which I always manually merge pull requests after rebasing and squashing them:


* c27b7c4 Fix namespace error with setter type hints 
* d2ed3f3 (tag: v0.6.0) Update changelog; release 0.6.0 
* 5da7642 Add keywords to readme 
* f035a40 Prefer setter methods over directy property access 
* 6059b72 Change setter method name calculation for properties with _ underscores 
* 11bceb0 Issue #28: update README; test for underscores 
* 6d1de35 (tag: v0.5.0) Run tests on php7, too 
* 5d7befc Update changelog, prepare release of 0.5.0 
* af33d36 Check for "double" instead of "float" 
* 00a7b68 Fix CS 
* c830437 Support nullable types (int|null) 
* 7a294e3 Increase test coverage to 100% 
]]>

Other rants about the merge button

Written by Christian Weiske.

Comments? Please send an e-mail.