Which email is used for "Squash and merge" commits?

When merging a pull request using a “Squash and merge” commit I can’t choose which email address to use for the commit, like you can when creating a merge commit. It also doesn’t seem to matter which email address is my primary - it always uses the same one (and not the one I want, unfortunately).

How does it choose which email to use?

7 Likes

Hi @adam-mccoy,

Thanks for being here! The email address used for merging Pull Requests defaults to the last one used in the large majority of cases. There’s a few scenarios where the email may not default to the one last used. 

In short, default email selection isn’t retained for squash merges due to technical/product constraints. The team are aware of this limitation and are having an open discussion around possible alternatives.

1 Like

In short, default email selection isn’t retained for squash merges due to technical/product constraints.

I think I have to remove old email addresses from my GitHub profile as a workaround. I would highly appreciate any other ideas. I think it would help quite a few people if it would be possible to select the email address for squash merges, just like it is possible to select the email for merge commits and commits from the web UI in general.

2 Likes

Same here, I cannot control what email is used on squash merges. When working on multiple projects this is a serious inconvenient. I find myself having to remove and re-add emails several times per week, and when the emails are removed many commits are not identified as mine.

@andreagriffiths11would it be possible to know at least what decides what address is used so we can try to find a workaround? Thanks!

2 Likes

Please Let me know also the solution.

Same here, I can’t control what email is utilized on squash blends. When taking a shot at numerous undertakings this is genuinely badly designed. I end up expelling and re-include messages a few times each week, and when the messages are evacuated many submits are not distinguished as mine.

Hi @andreagriffiths11. I’m affected too at work, and have to tell colleagues to unset+restore their personal email for their work email to be used on squash & merging :confused:.

The team are aware of this limitation and are having an open discussion around possible alternatives.

Great :slightly_smiling_face:. Any progress since March?

Thanks.

1 Like

This is a pretty annoying limitation, especially considering that the address selection appears to be a bit random. I just had a case where all commits being squashed were with the same address, which is one of my verified and public addresses, and yet another address was used in the commit.

It would be good to allow for selection of a fixed squash address on a per-organization basis (just as for notifications).

1 Like