# Change Default merge strategy options

2 messages from 2016-10-14 to 2016-10-16. Participants: Daniel Lopez, Jeff King.
Thread: https://gitlist.dev/t/44295

## Daniel Lopez, 2016-10-13 15:57

Subject: Change Default merge strategy options
Message-ID: <HE1PR0101MB218771966DAC7634B9735634BDDC0@HE1PR0101MB2187.eurprd01.prod.exchangelabs.com>
URL: https://gitlist.dev/e/HE1PR0101MB218771966DAC7634B9735634BDDC0%40HE1PR0101MB2187.eurprd01.prod.exchangelabs.com
In-Reply-To: <HE1PR0101MB2187D29367CB67F42373647CBDDC0@HE1PR0101MB2187.eurprd01.prod.exchangelabs.com>

```
Hi,

How to use 'git config --global' to set default strategy like recursive.


Example:
Currently , when we want to enforce a specific strategic we need to include  its reference on the command line : 
git.exe merge --strategy=recursive --strategy-option=ignore-all-space dev-local


we would like to define it as the default strategic to follow and be able to simplify the command line to:

git.exe merge dev-fix1.3-local 

Using alias is not an option as the git is being called from TortoiseGit (our current gui tool).


Daniel Lopez
Concept Developer

Tel: +351 289 100683 | Email: dlopez@csscorporate.com | www.csscorporate.com |   


```

## Jeff King, 2016-10-14 19:18

Subject: Re: Change Default merge strategy options
Message-ID: <20161014191827.qf43nk3bum7gy4dj@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20161014191827.qf43nk3bum7gy4dj%40sigill.intra.peff.net
In-Reply-To: <HE1PR0101MB218771966DAC7634B9735634BDDC0@HE1PR0101MB2187.eurprd01.prod.exchangelabs.com>

```
On Thu, Oct 13, 2016 at 03:57:55PM +0000, Daniel Lopez wrote:

> How to use 'git config --global' to set default strategy like
> recursive.

I don't think there is a way to do so, though note that the default
strategy is already "recursive". You can set individual file merge
drivers with gitattributes, but I don't know of a way to set the overall
strategy.

> Example:
> Currently , when we want to enforce a specific strategic we need to
> include  its reference on the command line : 
> git.exe merge --strategy=recursive --strategy-option=ignore-all-space dev-local

Some strategy options have their own config already (like
merge.renormalize). I guess in theory we could grow config options for
the other ones, though I think config for "strategy and its options"
might be more elegant.

-Peff

```
