How to avoid "Merge branch 'name_of_branch' in commit messages?

Viewed 33587

I remember that for about a year ago I did some merges that resulted in the commit messages being Merge branch 'Name_of_branch' on the remote repository.

From what I remember it would happen if I rebased all commits in a branch and then merged it to master and then pushed to remote repository.

But now I can't reproduce it with git-1.7.2.2.

Have it been fixed? Or can someone explain how this happens, and perhaps how to avoid it?

3 Answers

I don't mind the automatic message, but I did want to avoid having to exit my editor just to keep the default. The following option achieves that behavior (in a script of mine):

GIT_MERGE_AUTOEDIT=no git merge origin/master
Related