Merge Commit guidelines #81

Open
opened 2026-02-17 11:43:20 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @fallion on GitHub (Sep 11, 2019).

For merge commits how lenient are conventional commits? Can a tool for checking conventional commit compliance simply find the Merge keyword and allow anything after that?

https://github.com/commitsar-app/commitsar/issues/101

Originally created by @fallion on GitHub (Sep 11, 2019). For merge commits how lenient are conventional commits? Can a tool for checking conventional commit compliance simply find the `Merge` keyword and allow anything after that? https://github.com/commitsar-app/commitsar/issues/101
Author
Owner

@wesleytodd commented on GitHub (Sep 30, 2020):

I think this is tricky, because technically a merge commit is any commit with more than one parent. I have edited a merge commit message and not kept the Merge keyword. I don't know how common this is but I feel like any opinions here might be better left to the tooling than added to the spec.

If a tool wants to get very technical about it, it can run something like git rev-list -1 --merges HEAD~1..HEAD to see if the commit is a merge commit. Since the spec and parser do not have opinions on underlying git features (or even git as the scm at all), I think maybe it is best to follow the guidance on reverts and leave it up to tools.

@wesleytodd commented on GitHub (Sep 30, 2020): I think this is tricky, because technically a merge commit is any commit with more than one parent. I have edited a merge commit message and not kept the `Merge` keyword. I don't know how common this is but I feel like any opinions here might be better left to the tooling than added to the spec. If a tool wants to get very technical about it, it can run something like `git rev-list -1 --merges HEAD~1..HEAD` to see if the commit is a merge commit. Since the spec and parser do not have opinions on underlying git features (or even git as the scm at all), I think maybe it is best to [follow the guidance on reverts and leave it up to tools](https://www.conventionalcommits.org/en/v1.0.0/#how-does-conventional-commits-handle-revert-commits).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/conventionalcommits.org#81