www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Git "squash and merge"

reply Johan Engelen <j j.nl> writes:
Hi all,
   Do you like the "Squash and merge" thing of Github (no merge 
bubble, instead a rebase+fastforward merge)? We've used it a few 
times now, should it be the default or do you like normal merge 
better? Or perhaps you really just don't care :-)

I am undecided on it, and think it doesn't matter much. So 
generally, when there is no squashing to be done, I do a merge 
like before. Otherwise a squash+merge.

-Johan
Jan 17 2017
parent reply kinke <noone nowhere.com> writes:
I've seen you using it, and I liked it especially for 
cherry-picking onto a release branch, as the automatic reference 

the PR directly.

On Tuesday, 17 January 2017 at 21:44:53 UTC, Johan Engelen wrote:
 So generally, when there is no squashing to be done, I do a 
 merge like before. Otherwise a squash+merge.
Similar here, but I like it especially for single-commit PRs, as having two commits for each of those doesn't make a lot of sense to me.
Jan 18 2017
parent Johan Engelen <j j.nl> writes:
On Wednesday, 18 January 2017 at 09:55:58 UTC, kinke wrote:
 I've seen you using it, and I liked it especially for 
 cherry-picking onto a release branch, as the automatic 

 it show up in the PR directly.
That's a very good argument.
 On Tuesday, 17 January 2017 at 21:44:53 UTC, Johan Engelen 
 wrote:
 So generally, when there is no squashing to be done, I do a 
 merge like before. Otherwise a squash+merge.
Similar here, but I like it especially for single-commit PRs, as having two commits for each of those doesn't make a lot of sense to me.
OK, so I'm going to try to do this from now: if (commitCount < 2) { squashAndMerge(); } else { if (niceToPreserveIndividualCommits()) { while (tooManyFixupCommits()) { askForManualCommitHistoryCleanup(); yield(); } merge(); } else { squashAndMerge(); } }
Jan 18 2017