4

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?

CodeWizard
  • 128,036
  • 21
  • 144
  • 167
George L
  • 1,673
  • 2
  • 26
  • 39
  • 3
    Possible duplicate of [Git cli: get user info from username](http://stackoverflow.com/questions/7552054/git-cli-get-user-info-from-username) – René Höhle Jan 04 '16 at 21:29
  • It seems querying the GitHub /commits API a few pages to get the current history is enough for most of the cases to associate the people in the repository. – George L Jan 08 '16 at 02:34

2 Answers2

4

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@address.com 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

TomTasche
  • 5,448
  • 7
  • 41
  • 67
4

Nope, since the data is now on your machine and has nothing to to with github.

Github use user/password or SSH to authenticate users.
The github users that you see on the site is something they render on the server side.

So the answer is no unless you run script to fetch the date.


GITHUB API

You might be able to use this but you will need the vice versa info i assume

Community
  • 1
  • 1
CodeWizard
  • 128,036
  • 21
  • 144
  • 167