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

Categories

0 votes
309 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?

question from:https://stackoverflow.com/questions/65854877/how-do-i-make-github-display-real-name-on-commits

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

1 Reply

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...