2016-09-02 39 views
1

我能做到以下幾點:git的差異與用戶名

git diff tag1 tag2 --stat 

但是這給了我的文件列表。我怎麼能知道誰擁有這些兩個標記之間工作的所有用戶!

回答

4

第一種方法可以使用git log

在混帳回購協議本身:

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的點語法,請參閱 「What are the differences between double-dot 「..」 and triple-dot 「…」 in Git commit ranges?」)

這給:

Eric Wong <[email protected]> 

daemon.c 
Edward Thomson <[email protected]> 

pretty.c 
t/t6006-rev-list-format.sh 
David Kastrup <[email protected]> 

builtin/blame.c 
René Scharfe <[email protected]> 

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 <[email protected]> 
Alfred Perlstein <[email protected]> 
Andreas Brauchli <[email protected]> 
Andrew Oakley <[email protected]> 
Armin Kunaschik <[email protected]> 
Charles Bailey <[email protected]> 
Charles Bailey <[email protected]> 
Chris Packham <[email protected]> 
Dave Nicolson <[email protected]> 
... 
+0

感謝您尋找到它VonC。我沒有得到結果;我正在做兩個標籤之間的git diff;我只想要修改這兩個標籤之間的代碼的用戶。git log如何解決問題而不使用git diff – Deepak

+0

@Deepak它將解決問題,因爲它列出了兩個標籤之間的所有提交作者,這意味着修改了這兩個標籤之間的代碼的用戶。 – VonC

+0

在你的例子中是v2.9.0。 .v2.9.3和兩個標籤 – Deepak