git GitHub - 按作者列出提交
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12174276/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
GitHub - List commits by author
提问by PNS
Is there any way on GitHubto list all commits made by a single author, in the browser (neither locally, e.g. via git log
, nor via the API)?
在GitHub 上有没有办法在浏览器中列出单个作者所做的所有提交(既不是本地的,例如通过git log
,也不是通过 API)?
Clicking on a user name in the list of commits (Commit History) simply leads to that user's profile page. Examining the GitHub UI and searching (Google, StackOverflow) does not reveal a way to do this.
单击提交列表(提交历史记录)中的用户名只会转到该用户的个人资料页面。检查 GitHub UI 并进行搜索(Google、StackOverflow)并没有发现执行此操作的方法。
回答by Prem
If the author has a GitHub account, just click the author's username from anywhere in the commit history, and the commits you can see will be filtered down to those by that author:
如果作者有 GitHub 帐户,只需在提交历史中的任意位置单击作者的用户名,您可以看到的提交将被过滤为该作者的提交:
You can also click the 'n commits' link below their name on the repo's "contributors" page:
您还可以在 repo 的“贡献者”页面上单击其姓名下方的“n commits”链接:
Alternatively, you can directly append ?author=<theusername>
or ?author=<emailaddress>
to the URL. For example, https://github.com/jquery/jquery/commits/master?author=dmethvinor https://github.com/jquery/jquery/commits/[email protected]both give me:
或者,您可以直接将?author=<theusername>
或附加?author=<emailaddress>
到 URL。例如,https://github.com/jquery/jquery/commits/master?author=dmethvin或https://github.com/jquery/jquery/commits/[email protected]都给出我:
For authors without a GitHub account, only filtering by email address will work, and you will need to manually add ?author=<emailaddress>
to the URL - the author's name will not be clickable from the commits list.
对于没有 GitHub 帐户的作者,只能通过电子邮件地址进行过滤,并且您需要手动添加?author=<emailaddress>
到 URL - 作者姓名将无法从提交列表中单击。
You can also get the list of commits by a particular author from the command line using
您还可以使用以下命令从命令行获取特定作者的提交列表
git log --author=[your git name]
Example:
例子:
git log --author=Prem
回答by Brad Parks
Just add ?author=<emailaddress>
or ?author=<githubUserName>
to the url when viewing the "commits" section of a repo.
查看 repo 的“提交”部分时,只需将?author=<emailaddress>
或添加?author=<githubUserName>
到 url。