1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| # Number of commits by author
$ git shortlog -s --author 'Author Name'
# List of authors and commits to a repository sorted alphabetically
$ git shortlog -s -n
# List of commit comments by author
# This also shows the total number of commits by the author
$ git shortlog -n --author 'Author Name'
# list the first 5 committers who commit the most a year for current branch
# with email info
git log --since="1 year ago" | fgrep Author | sort | uniq -c | sort -n -r | sed -e 's,Author: ,,' | head -n5
# without email info
git log --since="1 year ago" | fgrep Author | sed -e 's, <.*>,,' | sort | uniq -c | sort -n -r | sed -e 's,Author: ,,' | head -n5
# for master branch all time
git log master | fgrep Author | sed -e 's, <.*>,,' | sort | uniq -c | sort -n -r | sed -e 's,Author: ,,' | head -n5
# list of add lines, remove lines, total lines by author
git log --author=mystic --pretty=tformat: --numstat | gawk -v red='\033[01;31m' -v green='\033[01;32m' -v blue='\033[01;34m' '{ add += $1; subs += $2; loc += $1 - $2 } END { printf green"Added Lines: +++%s\n"red"Removed Lines: ---%s\n" blue"Total Lines: ===%s\n", add, subs, loc }'
|