Skip to content

Modify Squash and Merge commit message behaviour

Right now when squashing commits, the behavior for creating the commit message doesn't make any sense:

  1. If a commit with more than 1 line is found, it will use that for the commit message.
  2. If everything is "normal", i.e. all the commits have one line, then only the MR title is used for creating the commit message.
  3. If the MR contains only 1 commit, then it uses the commit's message instead of using the MR title.

Right now it's really painful to use the squash and merge feature with these kind of behaviors.

I suggest getting rid of the behavior 1 and to use both the MR title and body to make a standard Git commit like this:

Commit title

Commit body.
...

Additional info: https://chris.beams.io/posts/git-commit/#seven-rules

Thanks.

Edited by Ghost User