How to get Git log with short stat in one line?

后端 未结 7 1561
無奈伤痛
無奈伤痛 2020-12-09 15:52

Following command outputs following lines of text on console

git log --pretty=format:\"%h;%ai;%s\" --shortstat
ed6e0ab;2014-01-07 16:32:39 +0530;Foo
 3 files         


        
7条回答
  •  生来不讨喜
    2020-12-09 16:08

    git log  --oneline --pretty="@%h"  --stat   |grep -v \| |  tr "\n" " "  |  tr "@" "\n"
    

    This will show something like this:

    a596f1e   1 file changed, 6 insertions(+), 3 deletions(-) 
    4a9a4a1   1 file changed, 6 deletions(-) 
    b8325fd   1 file changed, 65 insertions(+), 4 deletions(-) 
    968ef81   1 file changed, 4 insertions(+), 5 deletions(-) 
    

提交回复
热议问题