Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git 如何生成有关用户贡献的报告?_Git_Github_Report_Reporting - Fatal编程技术网

Git 如何生成有关用户贡献的报告?

Git 如何生成有关用户贡献的报告?,git,github,report,reporting,Git,Github,Report,Reporting,我想知道如何创建报告 我需要的第一个报告是从开始日期时间到结束日期时间从特定用户更改的所有文件 第二个类似于第一个,但我需要所有的消息提交和文件从一个特定用户从开始到结束日期时间的更改 我怎样才能做到这一点 例如: 报告1 用户 文件从2013-07-03 12:34:45更改为2013-09-16 15:00:37 报告2 用户 提交时间为2013-07-03 12:34:45至2013-09-16 15:00:37,文件已更改 Message commit 1 e.php j

我想知道如何创建报告

我需要的第一个报告是从开始日期时间到结束日期时间从特定用户更改的所有文件

第二个类似于第一个,但我需要所有的消息提交和文件从一个特定用户从开始到结束日期时间的更改

我怎样才能做到这一点

例如:

报告1 用户

文件从2013-07-03 12:34:45更改为2013-09-16 15:00:37

报告2 用户

提交时间为2013-07-03 12:34:45至2013-09-16 15:00:37,文件已更改

Message commit 1
    e.php
    j.txt

Message commit 2
    ka.rb
    asdf.jsp

... the another ones
这是:

  • 类似于“
  • 但添加“”中提到的日期选项
  • 并使用“”中描述的“
    --author
    ”过滤器
我在网上测试了这些:

  • Report1
    将使用
    git diff

    C:\Users\VonC\prog\git\git>
    git diff --author="Junio C Hamano" --name-status --pretty=oneline --abbrev-commit master@{"29 Jun 2013"}..master@{"14 Aug 2013"}
    
这是不令人满意的,因为它使用的是只能追溯到90天以前的

一种更可靠的方法是要求获得正确的SHA1,以便
git diff
使用:
(但这只适用于类似unix的bash,而不适用于DOS shell)

  • Report2
    将使用
    git日志

    C:\Users\VonC\prog\git\git>
    git log --author="Junio C Hamano" --name-status --pretty=oneline --abbrev-commit --since "10 Sep 2012" --until "12 Nov 2012"
    

Thx很多。非常有趣的解决方案。我会测试然后接受答案。同样,thx a lot=)精彩的脚本VonC。又多了^^
    VonC@VonCvb /c/Users/VonC/prog/git/git (master)
    $ git diff --author="Junio C Hamano" --name-status --pretty=oneline --abbrev-commit $(git rev-list -n 1 --before="10 Sep 2012" master) $(git rev-list -n 1 --before="12 Nov 2012" master)
C:\Users\VonC\prog\git\git>
git log --author="Junio C Hamano" --name-status --pretty=oneline --abbrev-commit --since "10 Sep 2012" --until "12 Nov 2012"