我可以这样做:
git diff tag1 tag2 --stat
但是这给了我文件列表..我怎么知道在这两个标签之间工作的所有用户!
答案 0 :(得分:4)
第一种方法可以使用git log
:
在git repo中:
git log v2.9.0..v2.9.3 --name-only --format="%aN <%aE>" --reverse
git log <olderTag>..<newerTag> --name-only --format="%aN <%aE>" --reverse
^^
|_ don't forget the two dots.
(关于git dots语法,请参阅&#34; What are the differences between double-dot “..” and triple-dot “…” in Git commit ranges?&#34;)
这给出了:
Eric Wong <e@80x24.org>
daemon.c
Edward Thomson <xx@xx>
pretty.c
t/t6006-rev-list-format.sh
David Kastrup <xx@gxx>
builtin/blame.c
René Scharfe <xx@xx>
t/t4051-diff-function-context.sh
t/t4051/appended1.c
t/t4051/appended2.c
t/t4051/dummy.c
t/t4051/hello.c
t/t4051/includes.c
...
并获得独特贡献者的列表:
git log v2.9.0..v2.9.3 --format="%aN <%aE>" --reverse|sort|uniq
返回:
Alex Henrie <xx@xx.com>
Alfred Perlstein <xx@xx.org>
Andreas Brauchli <a.xx@xx.net>
Andrew Oakley <xx@xx.com>
Armin Kunaschik <xx@xx.com>
Charles Bailey <xx@xx.net>
Charles Bailey <xx@xx.org>
Chris Packham <xx@xx.com>
Dave Nicolson <xx@xx.com>
...