从提交历史中获取GitHub用户名 [英] Get GitHub username from commit history

查看:177
本文介绍了从提交历史中获取GitHub用户名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我克隆了一个repo到我的机器,并做了

git log



但在日志中,它显示人员的全名和电子邮件地址,而不是他们的github用户名。



有没有办法将提交关联到用户而不依赖于GitHub的网站?

解决方案

如果你想使用git log,似乎没有办法显示GitHub用户名,因为git不知道GitHub上用户的概念。但是,您可以通过搜索email@address.com in:email并单击左侧边栏中的用户来搜索GitHub上显示的电子邮件地址。



否则,您可以直接使用GitHub API: https://developer.github.com / v3 / repos / commitits /



最后但并非最不重要的是,您可以在GitHub上使用Commit-view: https://github.com/github/gitignore/commits/master


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?

解决方案

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

这篇关于从提交历史中获取GitHub用户名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆