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?
GitHub allows you to add as many email addresses to your account as you like. If you set an email address in your local Git configuration, you will need to add it to your account settings in order to connect your commits to your account.
A Git pull request is essentially the same as a Git merge request. Both requests achieve the same result: merging a developer's branch with the project's master or main branch. Their difference lies in which site they are used; GitHub uses the Git pull request, and GitLab uses the Git merge request.
Under your repository name, click Pull requests. In the "Pull Requests" list, click the pull request you'd like to merge. Depending on the merge options enabled for your repository, you can: Merge all of the commits into the base branch by clicking Merge pull request.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With