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

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"?

 

 

18 Replies
Highlighted
Ground Controller Lvl 1
Message 2 of 19

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

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

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
Highlighted
Copilot Lvl 2
Message 4 of 19

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.

Highlighted
Community Manager
Message 5 of 19

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!

Highlighted
Ground Controller Lvl 1
Message 6 of 19

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

Any news on this?

Highlighted
Ground Controller Lvl 2
Message 7 of 19

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

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

Highlighted
Ground Controller Lvl 2
Message 8 of 19

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

This would be so useful! I would love to be able to use the PR message as the commit message. This would allow one place where developers have to write a well formed description of the change rather than having to have it in multiple places. Any updates on this?

Highlighted
Ground Controller Lvl 1
Message 9 of 19

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".

Highlighted
Ground Controller Lvl 2
Message 10 of 19

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.