git log

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2020 Apr 3 8:9
Editor
Edited
Edited
2024 Apr 1 13:30
Refs

search in change

git log -p | grep blabla
 
 

user

git log --pretty="%ce%n" | sort | uniq
 

total contribution

git log --author=$USER --shortstat $BRANCH | \ awk '/^ [0-9]/ { f += $1; i += $4; d += $6 } \ END { printf("%d files changed, %d insertions(+), %d deletions(-)", f, i, d) }'
 

user contribution

# Loop through users for user in $(git log --pretty="%ce%n" | sort | uniq); do # print user email echo "$user" # print total files changed, total insertions, total deletions echo $(git log --author="${user}" --shortstat 'feature/#3236-facility-hover' | awk '/^ [0-9]/ { f += $1; i += $4; d += $6 } END { printf("%d files changed, %d insertions(+), %d deletions(-)", f, i, d) }') done
 
How to calculate the percentage of contribution from each contributor to words the Code in the Git or Gerrit?
You can do this by looping through the users and using the --shortstat option from : To get all commit email addresses from everyone who commited run the following command: git log --pretty="%ce%n" | sort | uniq This will print out all email addresses, sort them, and make a unique list from this.
How to calculate the percentage of contribution from each contributor to words the Code in the Git or Gerrit?
 
 
 

Recommendations