GitHub author: real name instead of username

When you do something using the GitHub web interface, for example, merging pull requests or working on gh pages, the author of the commit:

real name < email@address > 

but I would like it to be

 user name < email@address > 

Is there any way to change this?

When working with my local repo and clicking from here everything will be as expected.

Edit

Here are some simple steps to reproduce the problem:

  • create a new repo and check the box to generate the README.md file
  • clone repo
  • run gitk in your local repo - note that the real name is used, not the username

Here is a test repo (I will delete it later): https://github.com/puce77/test

Edit 2

Or is it recommended to use a real name? For what reason? I think the username is unique, but the real name may not be. In addition, real names change more often (for example, marriage) than usernames.

+6
source share
1 answer

Your username associates your commits with an identifier. To install it in the local repository, use the following command:

 git config user.name "Your name" 

To install it globally for each repository on your computer:

 git config --global user.name "Your name" 

All according to the documentation

0
source

Source: https://habr.com/ru/post/988404/


All Articles