如何在X日期之前看到来自单个提交者的代码是否幸存下来?

时间:2013-08-13 01:57:59

标签: git blame

一年前,我加入了一个非常有经验的开发团队,作为一个完整的RoR newb,现在我们正在努力猜测我在前六个月编写的代码中有多少幸存下来。

我想我可以在整个仓库中使用git blame然后grep我的用户名,但我正在撞墙。

1 个答案:

答案 0 :(得分:1)

有许多git统计工具,也许看看他们是否能胜任你需要的工作?点击herehere

修改

我去发现其中一种工具,发现它非常适合你。 gitinspector,以下是文本输出格式:

$ ./gitinspector.py -wTHl /path/to/some/git/repository
The following historical commit information, by author, was found in the repository:

Author               Commits   Insertions   Deletions   % of changes
John Smith               288         7721        4617          39.19
James Johnson            135         8910        2422          35.99
Robert Brown              71         2564        1352          12.44
Michael Davids           134         2943         954          12.38

Below are the number of rows from each author that have survived and are still intact in the current revision:

Author                     Rows   % in comments
John Smith                 3533           22.02
James Johnson              6113           52.15
Robert Brown               1123           21.19
Michael Davids             1464           20.15

The following history timeline has been gathered from the repository:

Author                  2012W37    2012W38    2012W39    2012W40    2012W41    2012W42    2012W43
John Smith             --++++++      --+++   --++++++       -+++   ---+++++  ----+++++          .
James Johnson                 +   -+++++++       ++++  -++++++++       --++     --++++   -+++++++
Robert Brown                         --+++          +          .       -+++          +          .
Michael Davids                         +++         ++          +          +          +          .
Modified Rows:             1522       3832       7553       6143       5833       5123       1477            

The extensions below were found in the repository history (extensions used during statistical analysis are marked):
xml [java] pdf txt css