git 计算特定用户在 Github 中的所有项目中编写的总行数
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22773834/
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
Count total lines written by a specific user throughout all its projects in Github
提问by mjkaufer
I'm wondering if there's a way in Github to count the total amount of lines of code a specific user has written throughout allof its projects.
我想知道 Github 中是否有一种方法可以计算特定用户在其所有项目中编写的代码行总数。
git log --author="<author>" --oneline --shortstat
would list the amount of code for a given repo, but I'm wondering if there is a way to list all the code a user has ever pushed to Github.
git log --author="<author>" --oneline --shortstat
会列出给定 repo 的代码量,但我想知道是否有办法列出用户曾经推送到 Github 的所有代码。
回答by mjkaufer
I've written a basic program that will do this: http://stats.kaufer.org/
我编写了一个基本程序来执行此操作:http: //stats.kaufer.org/
The source of it is on Github here: https://github.com/mjkaufer/stats
它的来源在 Github 上:https: //github.com/mjkaufer/stats
Basically, I ended up using Github's API.
基本上,我最终使用了 Github 的 API。