Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.4k views
in Technique[技术] by (71.8m points)

git - How do I make Github display real name on commits

According to github documentation, changing user.name should change commits to display as whatever name I've set as user.name. After setting this option, I still have my github username showing instead of the name I set in user.name even after pushing new commits.

I'd like to have commits I make to show my real name instead of my username as this looks more professional. I've tried using git config --global user.name "<real name>" and I have my real name on my github account. Am I missing something or should this just work?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

For commits associated with an account, GitHub shows the username in all cases; this is not configurable. The way a commit is associated with an account is by the email address on the commit matching one on the GitHub account.

Note that your commits will still show your real name if you run git log or another tool at the command line. The name shown will reflect the value of user.name set by the author or committer at the time the commit was created; changes to that value later do not change older commits.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...