Username in Mercurial usually has the form:
Name < email@domain.com >
Git is also usually configured with a name and email address for the user.
You may need to include the email address in your username in the Mercurial configuration so that the username in commits works correctly on github .
This username does not have to match your username on any particular website, it is used to record information. If you wanted to be the same, how could you ever push forward changes made by someone else?
For example, my bitbucket username is different from my Mercurial username in my commits, and the way I store my bitbucket username and password outside the bitbucket paths in hgrc is to use my [auth] .hgrc / Mercurial.ini section:
[auth] bb.prefix = bitbucket.org bb.schemes = https bb.username = myBBusername bb.password = myBBpassword
Placing a password here is optional (you will be asked), but there are safer alternatives for storing it, such as expanding the set of keys .
However, itโs a little late to change the username on existing change sets (you will have to rewrite the entire repo history).
source share