Git 提交分类

Git commit classification

我想可视化我们项目中的提交统计信息。我想根据一些指标将它们分为几个组,例如提交消息或更改的代码行数。

有什么系统的方法可以使用吗?我在为提交消息分类选择正确的关键字以及为大小分类选择合适的阈值时遇到了麻烦。

  1. 如果您的目标是分析提交消息,您可能想要使用自然语言处理 (NLP) 工具。一个好的起点可能是这本书 Tidy Text Mining。此资源适用于 R,但如果您还不熟悉术语 Term Frequencies (TF) 或 inverse document frequencies (tdf),则会提供简明的介绍).你会从一个简单的单词直方图开始,但是为了能够基于它做出陈述,你必须自定义 stopwords 并且可能会做很多其他预处理,比如 词干提取.

  2. 如果您对 GIT 项目的 一般指标 感兴趣(不限于提交消息),我建议您看一下在 Silvio Montanari's Code-Forensics project:

    code-forensics is a toolset for analysing codebases stored in a version control system. It leverages the repository logs, or version history data, to perform deep analyses with regards to complexity, logical coupling, authors coupling and to inspect the evolution in time of different parts of a software system with respect to metrics like code churn and number of revisions.

  3. 有关提交的重要信息已隐藏在 GIT 标签中,以防它们在您的项目中使用。首先,您可以尝试 git log --graph --oneline --simplify-by-decoration,它会给您 .

免责声明:我与提到的两个无关website/project,但我确实问过链接的问题。