Re: Forcing --no-ff on pull
- From
- Lars Hjemli <lh@elementstorage.no>
- Date
- Dec 9, 2008, 10:31 UTC
- Message-ID
- <8c5c35580812090231u28076844nf5a9225349c20801@mail.gmail.com>
- In-Reply-To
- <1228817565.18611.54.camel@starfruit.local>
On Tue, Dec 9, 2008 at 11:12, R. Tyler Ballance <tyler@slide.com> wrote:
Show 14 quoted lines
> On Tue, 2008-12-09 at 10:49 +0100, Lars Hjemli wrote: >> On Tue, Dec 9, 2008 at 10:34, R. Tyler Ballance <tyler@slide.com> wrote: >> > Is there a header macro I can define or a config option I could define >> > to make --no-ff on `git pull` implicit instead of explicit? >> >> Try this: >> $ git config branch.stable.mergeoptions "--no-ff" > > I recall stumbling across this a while ago looking at the git-config(1) > man page, but this isn't /quite/ what we need. > > I'm talking about forcing for *every* pull, it's a safe assumption to > make that we want a merge commit every time somebody fast-forwards a > branch.
$ git config alias.xpull "pull --no-ff" ?
But are you sure you never want a fast-forward on _any_ branch? I use --no-ff unconditionally on the master and stable branches as $dayjob, to make sure that the merging of feature/bugfix-branches are explicitly noted in history, but I almost never use it on other branches.
-- larsh