Is it better to use a separate commit message for a git merge?

commit, git, merge, svn

Solution

Unless you supply the `--no-merges` option to `git log`, it will normally show merges which are given a brief auto-generated commit description.

This is usually fine as git records the parentage of the commit and the interesting features of a merge are its constituent branches.

Try a `git log --graph --oneline` or use a graphical history viewer and you may (should!) be convinced that the way that git records merges is much more important and useful than a long winded merge commit message.

Merges only really need a detailed commit message if there was something 'magical' that was done in the resolve. As this means manual intervention this is easy to add at the this point.

Problem

I come from an SVN background so I'm not sure what the typical git workflow looks like. When you merge in SVN, you provide a commit message describing the merge. This is necessary because SVN's merge-tracking has historically been poor. I noticed that git's default behavior is to automatically commit the results of the merge if it is successful. This means that the log normally won't show merges, so everything in the history looks like it was developed in one branch. Is this preferable to showing merges as additional commits? I can think of several reasons why and why not, but I'd like some input from other users.

Original source