Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 13

How to change the default "Squash & Merge" commit message?

When "Squash & Merge" a branch in a PR, the default commit message is either:

 

- the commit message of the the commit in the PR, if the PR has a single commit;

- the title of the PR's and the description from all commits' titles, if the PR has more than one commits.

 

As this behavior is inconsistent, it often result in inconsistent merge messages.  Is there a way to configure the default commit message for "Squash & Merge"?

 

 

12 Replies
Ground Controller Lvl 1
Message 2 of 13

Re: How to change the default "Squash & Merge" commit message?

always commit more than once :P
Commander Lvl 3
Message 3 of 13

Re: How to change the default "Squash & Merge" commit message?

I've always thought you could just change the commit message while comitting? If you're talking about changing the deafult one, I don't think so.


- Mark
Copilot Lvl 2
Message 4 of 13

Re: How to change the default "Squash & Merge" commit message?

Big +1 to being able to change this. I'd love for the default squash and merge message to be the PR description (raw markdown text with commentst stripped out). In our workflows, the PR description contains much more meaningful content than the individual commit messages on a branch.

Community Manager
Message 5 of 13

Re: How to change the default "Squash & Merge" commit message?

Hi @JKillian,

 

Thanks for this feedback! We're always working to improve GitHub and the GitHub Community Forum, and we consider every suggestion we receive. I've shared your feedback with the appropriate teams for consideration.

 

Please let me know if you have any other questions.

 

Thanks!

Ground Controller Lvl 1
Message 6 of 13

Re: How to change the default "Squash & Merge" commit message?

Any news on this?

Ground Controller Lvl 2
Message 7 of 13

Re: How to change the default "Squash & Merge" commit message?

A "--fast-forward" on this would be greatly appreciated! :D

Ground Controller Lvl 1
Message 8 of 13

Re: How to change the default "Squash & Merge" commit message?

I'd really like this too. The whole reason our team uses Squash and Merge is to remove all our awful "fix a typo", "lint", "$#@*#!" commit messages. We force developers to write a clear description as a condition of a PR being considered "reviewable".

Ground Controller Lvl 2
Message 9 of 13

Re: How to change the default "Squash & Merge" commit message?

This feature would be amazing to have! We don't really care about the commit history when merging and any pertinent information is always avaiable in the PR description. A configuration to pull in the message from the PR's description would be really helpful.

Ground Controller Lvl 1
Message 10 of 13

Re: How to change the default "Squash & Merge" commit message?

+1 to this enhancement! We force everyone to squash and merge PRs in our repo so the individual commit messages within the PR are just for the PR author. All the squashed commits aren't relevant in the final commit description, so we would rather just automatically use the PR description. Thanks!!