哪些 Git 提交统计数据很容易提取 [英] Which Git commit stats are easy to pull
问题描述
以前我很喜欢 TortoiseSvn 为给定的 SVN 存储库生成简单提交统计信息的能力.我想知道 Git 中有哪些可用的东西,而且我特别感兴趣:
Previously I have enjoyed TortoiseSvn's ability to generate simple commit stats for a given SVN repository. I wonder what is available in Git and am particularly interested in :
- 每个用户的提交次数
- 每个用户更改的行数
- 一段时间内的活动(例如每周汇总的变化)
有什么想法吗?
推荐答案
其实 git 已经有这个命令了:
Actually, git already has a command for this:
git shortlog
就您而言,您似乎对这种形式感兴趣:
in your case, it sounds like you're interested in this form:
git shortlog -sne
有关各种选项,请参阅 --help
.
See the --help
for various options.
您可能还对 GitStats 项目感兴趣.他们有一些示例,包括 Git 项目的统计数据.从 GitStat 主页:
You may also be interested in the GitStats project. They have a few examples, including the stats for the Git project. From the GitStat main page:
这是当前生成的一些统计数据的列表:
Here is a list of some statistics generated currently:
- 一般统计信息:文件总数、行数、提交数、作者总数.
- 活动:按一天中的某个小时、一周中的某天、一周中的某个小时、年中的月份、年和月以及年进行提交.
- 作者:作者列表(姓名、提交次数 (%)、首次提交日期、最后提交日期、年龄)、月份作者、年份作者.
- 文件:按日期、扩展名的文件计数
- 行:按日期排列的代码行
这篇关于哪些 Git 提交统计数据很容易提取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!