I started to use HgGit extension for mercurial to have copy of repository at GitHub. Almost everything is working well, but in commits information at GitHub I see invalid-email-address (author)
instead of my username. Is there a way to show username correctly in this case?
相关问题
- How to add working directory to deployment in GitH
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
相关文章
- 请教Git如何克隆本地库?
- java开发bug问题:GitHub授权登录无法获取授权账号信息?
- Mercurial Commit Charts / Graphs [closed]
- What is the tortoisehg gui equivalent of doing “hg
- Is there a Github markdown language identifier for
- How to use Mercurial from Visual Studio 2010?
- “no implicit conversion of Integer into String” er
- GitHub:Enterprise post-receive hook
In order to fix the "invalid-email-address" issue you have to find old "git author names" in commits and set new names and email addresses of the "Author" and "Committer" for the commits before you push newly converted repository to GutHub.
This fix (search and replace...) is done using "git filter-branch" command. You may see ready to use example here: (now it's dead?!) Mercurial to Git, solving "invalid-email-address"
[Edited:] As the link above is dead now, I provide my example of the "fix-user-email.sh" file below. As yo may see, here two variants of an author name are being translated into the same valid GIT name/email pair:
I personally executed commands from the above mentioned page step by step in cygwin bash window (actually I ran/modified/re-ran a script in order to simplify my life, of course :-) ) and checked results using GIT-GUI...
When you are ready to test repository on GitHub,
A username in Mercurial is usually of the form:
Git also is usually set up with a name and an e-mail address for the user.
You probably need to specify an e-mail address in your username in your Mercurial config so that the username in the commits works correctly on github.
This username is not required to be the same as your username at any particular website, it's for commit information. If it were required to be the same, how would you ever be able to push changesets done by someone else?
For example, my bitbucket username is different than my Mercurial username on my commits, and the way I keep my bitbucket username and password out of the bitbucket paths in the repo's
hgrc
is to use the[auth]
section of my user.hgrc
/Mercurial.ini
:Putting the password here is optional (you'll be prompted), but there are more secure alternatives for storing it, such as the keyring extension.
However, it's a bit late to change the username on existing changesets (you'd have to re-write the repo's entire history).