Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [january-dev] Squash and Merge vs Create a Merge Commit

AFAICT If you do it once it remembers for you (it is certainly remembering for me now). The only thing we can change on GitHub is to force that flow, but forcing seemed too harsh as there is legitimate reasons to want merge commit. 


~~~
Jonah Graham
Kichwa Coders Ltd.
www.kichwacoders.com

On 15 March 2017 at 09:08, <Peter.Chang@xxxxxxxxxxxxx> wrote:

 

Hi Jonah,

 

Is there any way to make this the default in GitHub?

 

Regards,

Peter

 

 

From: january-dev-bounces@eclipse.org [mailto:january-dev-bounces@eclipse.org] On Behalf Of Jonah Graham
Sent: 13 March 2017 19:09
To: january developer discussions <january-dev@xxxxxxxxxxx>
Subject: [january-dev] Squash and Merge vs Create a Merge Commit

 

Hi devs,

 

At the moment we are adding to the git history lots of irrelevant commits. Nearly half of the commits are merge commits that just have the effect of making our history messy looking without adding much information.

 


The only information that merge commits are adding is the PR# and the person who applied the commit. 

 

The other information the merging adds is, generally, commits in the PR that are incomplete. This means that checking out intermediary commits will not give a working copy of the code. Obviously we don't release those intermediary versions, but doing operations like bisect and blame are made more difficult by this.

 

All of these issues can be solved with a squash and rebase workflow. GitHub added the ability in August [1] to do this from the GitHub UI. Simply select "Squash and Merge" instead of "Create a Merge Commit"

 


This will remove intermediary commits (generally those that are being patched by further commits on the same PR) and add the PR# to the end of the commit summary line.

 

I don't recommend squashing genuine feature branches that have real history (as opposed to fixups). 

 

Thanks,

Jonah

 

 

 

~~~
Jonah Graham
Kichwa Coders Ltd.
www.kichwacoders.com

 

-- 

This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
 


_______________________________________________
january-dev mailing list
january-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/january-dev



Back to the top