Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Why github username and commit name is not the same?

I have uploaded my project on github and on the website I have different username and commit name:

Image

For this post I have changed it to "NAME 1" and "NAME 2" .

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Why aren’t they same? I think I have changed it in the past ( because NAME 2 is familiar for me: it is my last name )and now I don’t know where have I changed it.
I want to change it to NAME 1 (to my github username).

I tried to change Git user.email and user.name but these have no affect to NAME 2.

>Solution :

You may check your user name and user email in your local git config:

$ git config --list

If it’s different then you can change it for the next commits:

$ git config --global user.name "John Doe"  
$ git config --global user.email johndoe@example.com

The other way, you can use a special file in your repo to change a user name and email to something else

Create a file named .mailmap

And add this line:

Name 1 <name1@email.com> Name 2 <name2@email.com>

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading