Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Combine git log --stat with --name-status?

Tags:

git

I have two git log aliases set up: one to show --name-status:

...
| A   path/to/yourfile.c
| M   path/to/myfile.c
| M   path/to/my/otherfile.c
...

and one to show --stat:

...
|  path/to/yourfile.c          |    2 ++
|  path/to/myfile.c            |    2 +-
|  path/to/my/otherfile.c      |   27 +++++-----
...

Is it possible to combine the two?

...
| A   path/to/yourfile.c          |    2 ++
| M   path/to/myfile.c            |    2 +-
| M   path/to/my/otherfile.c      |   27 +++++-----
...

I love the --stat overview, but it doesn't tell me if files were added or removed; just that they were modified in some way.

(When the two command-line flags are combined, --stat is ignored.)

like image 256
ellotheth Avatar asked May 23 '12 00:05

ellotheth


1 Answers

I don't know of a way to combine --stat and --name-status, but you can use git log --stat --summary to get a list of added/removed/renamed/copied files in addition to the diffstat.

like image 134
jacknagel Avatar answered Oct 17 '22 02:10

jacknagel