11

I'm trying to configure git to always accept the default merge message when merging (with option --no-edit). I found this answer (Git merge doesn't use default merge message, opens editor with default message) but it doesn't work for me, and it is not listed in the manual (git-config).

The following configuration (with an actual branch name rather than "*") does work for a single branch, but I need the configuration on all branches, so I tried this, to no avail.

[branch "*"]
    mergeoptions = --no-edit

Is there any global configuration to do this ?

EDIT

While searching I found the branch "*" configuration was proposed a while back as a patch, but never implemented ([PATCH] Add default merge options for all branches).

Community
  • 1
  • 1
Alexandre DuBreuil
  • 5,431
  • 2
  • 19
  • 17
  • 2
    Try the `GIT_MERGE_AUTOEDIT=no` environment variable mentioned in the other question. Or, if it's OK, make yourself an alias: `git config --global alias.nm 'merge --no-edit'` and then use `git nm` (feel free to use some other name, `nm` is not a great name :-) ). – torek Jan 30 '14 at 18:02
  • I would have preferred a git configuration, but the GIT_MERGE_AUTOEDIT=no environment variable works. Thanks. – Alexandre DuBreuil Feb 03 '14 at 10:10

1 Answers1

6

Overriding the merge command with an alias that appends --no-edit seems to work:

[alias]
    merge = merge --no-edit
bkeepers
  • 2,135
  • 2
  • 16
  • 9