1

I'm trying to prevent essentially empty commit messages like Merge branch 'articleScore' from occurring when merging a branch into master.

So my question is: how can I prevent empty featureBranch merge commit messages from occurring? My only thought is to

  • git checkout master
  • git rebase featureBranch

But I haven't seen anyone else mention that solution (or this problem).

And BTW, I've spent a few hours researching this, and it's different from git pull --rebase and git --no-commit which does something entirely unrelated.

JohnAllen
  • 7,317
  • 9
  • 41
  • 65
  • 1
    What do you mean by "empty merge commit messages"? You don't like the auto-generated commit messages, or you don't like the merge commits? Your problem is not clear, and neither is your desired outcome. – janos Mar 02 '14 at 07:16
  • 1
    I don't like the ones I mentioned in the question. `Merge branch 'featurebranch'`. I may have found [a/the solution](http://stackoverflow.com/questions/16358418/how-to-avoid-merge-commit-hell-on-github-bitbucket), though it's still a bit cryptic for me. – JohnAllen Mar 02 '14 at 07:16
  • 1
    I just want to merge the two without having a meaningless commit message in our log – JohnAllen Mar 02 '14 at 07:23
  • 2
    No, we don't really want there to be a commit message at all ideally. The answer I linked to has it. Not sure if I should close or not. But the answer is you do `git merge --ff-only featureBranch` as noted in [this answer](http://stackoverflow.com/questions/16358418/how-to-avoid-merge-commit-hell-on-github-bitbucket) – JohnAllen Mar 02 '14 at 07:26
  • 1
    I see. It's not about the *message*, you didn't want the *merge commit*. Yes it's a duplicate of the answer you linked. – janos Mar 02 '14 at 07:29

0 Answers0