Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get GitHub username from commit history

I cloned a repo to my machine, and did

git log

but in the logs, it shows the persons full name and email, rather than their github username.

Is there a way to associate the commits to a user without relying on GitHub's website?

like image 706
George L Avatar asked Feb 08 '23 03:02

George L


1 Answers

If you want to use git log there doesn't seem to be a way to show the GitHub username, because git doesn't know anything about the concept of users on GitHub. However, you could search for the email address shown in git log on GitHub by searching for "[email protected] in:email" and clicking "Users" in the left sidebar.

Otherwise, you could use the GitHub API directly: https://developer.github.com/v3/repos/commits/

Last but not least, you could use the Commit-view on GitHub: https://github.com/github/gitignore/commits/master

like image 154
TomTasche Avatar answered Feb 13 '23 03:02

TomTasche