Inconsistent merge commit messages

What determines the commit message for a Git merge on SourceTree?

Occasionally I'll get a message indicating a branch merge, occasionally I'll get a message indicating a commit merge -- what triggers the difference, and is there any way to always force the "branch" option?

To be clear -- these are both occurring when trying to commit a separate branch back into master.

Example commit messages:

"Branch" style:

Merge branch 'apc'

"Commit" style:

Merge commit 'd5ba46c6c6275bc272cb29eb09ef28c0bc292578'

1 answer

1 accepted

SourceTree takes the default commit message for a merge from what Git generates (it puts this in .git/MERGE_MSG) and would normally default to itself if you committed from the command line. We do this for consistency so people get what they'd expect from using the command line version.

Thanks for the reply, Steve. Looks like I'll have to dig into my Git book to see why it's giving inconsistent MERGE_MSG values.

Suggest an answer

Log in or Join to answer
Community showcase
Maarten Cautreels
Posted Thursday in Off-topic

Friday Fun: What's your favourite beer/drink

As a Belgian, beer-lover and home brewer, beer is one of my great passions. I love the fact that with just a few ingredients (usually just water, hop and malt) you can create so many different tastes...

281 views 38 9
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot