Reputation:
I am new to git and I am trying to accomplish the following: I want to print a short summary listing commits title, author, timestamp(optional), and just number of addition/deletion/update.
What I have done is I use git log --shortstat --oneline
and it almost achieves my requirements except it lacks the author that committed the changes. Can I tweak the command abit to show the author as well?
P/S: This is what I get from the command above and I want it to show the authors as well.
2d2b0b9 Commit#1 **[Authors]**
2 files changed, 8 insertions(+), 7 deletions(-)
e90dc73 Commit#2 **[Authors]**
2 files changed, 20 insertions(+), 12 deletions(-)
Upvotes: 12
Views: 8986
Reputation: 7720
Have a look at git log --pretty=format:<format string>
, Here is a good explanation.
For exmaple
git log --pretty=format:"%h - %an (%ae): %s" --shortstat
will give you the hash (%h
), the author name and email (%an
, %ae
) and the subject (%s
), followed by the --shortstat
line
Upvotes: 18