Reputation: 143795
I have the following situation. At github I have two email address: stefano@home and stefano@work. My github account is configured for stefano@home to be the primary address. At work, I correctly set up my git checkouts to create commits with stefano@work. However, when I go to github and merge PRs onto work's repos, my merge commits appear with stefano@home address.
How can I say that all PR merges on that specific repo must have stefano@work?
Upvotes: 15
Views: 4633
Reputation: 1324576
Merging from the GitHub UI always used the primary email address on your account, ...
But, since April 24th 2019 (4 years later):
"Choose your merge commit email"
You can now choose the author email for commits created when merging pull requests via the web.
As a reminder, you can also choose the author email for web-based edits.
For more information, see merging a pull request.
2022: the GUI is also:
Reminder:
If you have more than one email address associated with your account on GitHub.com, click the email address drop-down menu and select the email address to use as the Git author email address.
Only verified email addresses appear in this drop-down menu.
If you enabled email address privacy, then<username>@users.noreply.github.com
is the default commit author email address.For more information, see "Setting your commit email address".
Upvotes: 11
Reputation: 18803
Merging from the GitHub UI always uses the primary email address on your account, or the private @users.noreply.github.com
version if you've checked that box. If you want to use different emails per repository, you'll have to git merge
from the command line. GitHub will still close the PR properly.
Upvotes: 8