2012-07-04 4 views

답변

3

git log --stat

commit e2b97c53727bd66c143713d13399ff4242e4ff06 
Author: John Hobbs 
Date: Thu Nov 4 17:01:14 2010 -0500 
    Switched to jQuery Mobile. It's awesome. 
application/classes/controller/item.php | 77 +++++++++++++--------------- 
application/classes/controller/project.php | 4 +- 
application/classes/controller/site.php | 2 + 
application/classes/controller/user.php | 5 +- 
application/classes/form.php    | 2 +- 
application/views/item/add.php    | 27 +++------- 
application/views/item/index.php   | 19 ++----- 
application/views/item/view.php   | 11 +++-- 
application/views/message/basic.php  | 13 +++++ 
application/views/mobile.php    | 64 ++++++++++++++++++----- 
application/views/project/add.php   | 5 +-- 
application/views/project/index.php  | 28 ++++------ 
application/views/project/view.php   | 19 ++----- 
application/views/user/index.php   | 25 +-------- 
application/views/user/login.php   | 14 +++-- 
application/views/user/register.php  | 20 ++++--- 
16 files changed, 165 insertions(+), 170 deletions(-) 

(here의 샘플 출력)

가 육안 긴 +/- 징후를 보이는하거나 필터링하는 다른 명령 --numstat 파이프 사용.

man git log


(앙투안 권장 --shortstat) 대신 시각적으로 그 일을 필터링해야하는 경우 :

$ git log --pretty=oneline --shortstat 

이이처럼 출력을 제공합니다 :

$ git log --pretty=oneline --shortstat 
19791900f886e7a5f92b7cf3536053c863bec067 fix tab title, system menu, and a focus 
2 files changed, 108 insertions(+), 65 deletions(-) 
b52941150046cdb455c38e3f9bc133d6ba8f721f give tab a wndproc, change time to be 
1 files changed, 65 insertions(+), 20 deletions(-) 
ae5c18524b4a02b264fe26319ce2c9cf7dbff6b2 Fix window style of parent window 
1 files changed, 1 insertions(+), 1 deletions(-) 
8f94ad9bbbb2fec42feccda43374b13eda55c018 Add .gitignore to ignore some MSVC file 
1 files changed, 10 insertions(+), 0 deletions(-) 

awk에 파이프가 '파일 변경됨'을 검색하고 p AWK 인수 중 일부에 대한

$ git log --pretty=oneline --shortstat | awk '/files changed,/&& $4 > 50 {print x; print};{x=$0}' 

19791900f886e7a5f92b7cf3536053c863bec067 fix tab title, system menu, and a focus 
2 files changed, 108 insertions(+), 65 deletions(-) 
b52941150046cdb455c38e3f9bc133d6ba8f721f give tab a wndproc, change timer 
1 files changed, 65 insertions(+), 20 deletions(-) 

출처 : 프 린 팅은 삽입의 큰 수 (50)보다 일치하는 라인과 이전 행의 경우 http://unstableme.blogspot.com/2008/05/print-currentnextprevious-line-using.html

+0

즉 실제 대답했다, 내가 --shortstat'추천 '대신 –

+0

나는 그것을 알고 있었다. 자, 실제로 만들어진 질문에 대한 대답을 갖고 있습니까? –

+0

나는 그 일을하는 법을 알았는지 몰랐습니다. 또한 커다란 변경으로 커밋을 찾고 있다면 시각적으로 수동 필터를 사용하여 커밋을 놓치지 않을 것입니다. 50 행 미만의 모든 커밋을 필터링하면 커밋을 놓치게되어 관심있는 49 가지 변경 사항을 알 수 있습니다. 어쨌든 필자는 awk를 사용하여 필자의 대답을 편집했다. – user1493941

관련 문제