[jboss-as7-dev] Preventing merge commits

Stuart Douglas stuart.w.douglas at gmail.com
Fri Jul 13 06:06:43 EDT 2012


When I am merging to push upstream I try and always use the --ff-only option when merging, and also check with gitk before I push, to make sure there are no merge commits

Sent from my iPhone

On 13/07/2012, at 19:13, Jaikiran Pai <jpai at redhat.com> wrote:

> On Friday 13 July 2012 02:39 PM, Jaikiran Pai wrote:
>> I have been looking around some git docs, but can't find an answer to
>> this. So asking here - Is it possible to set this option per (remote)
>> repo level instead of per (local) branch level? For example,
>> irrespective of which local branch I'm on (which I later push upstream),
>> I don't want to accidentally push  non-fast forwardable revisions to
>> upstream. Is that possible?
> Well, not accidentally since git does prevent it unless you use -f 
> option during push. So I guess what I am looking for is, as an admin 
> configure my remote repo to only allow fast forward commits. Now that I 
> think of it I guess this is more of a github option than git.
> 
> -Jaikiran
>> 
>> -Jaikiran
>> On Thursday 08 September 2011 12:20 AM, Jason T. Greene wrote:
>>> If you want to prevent merge commits from ever entering a particular
>>> branch of yours, say master, just do this:
>>> 
>>> git config branch.master.mergeoptions --ff-only
>>> 
>> 
>> _______________________________________________
>> jboss-as7-dev mailing list
>> jboss-as7-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
> 
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev



More information about the jboss-as7-dev mailing list