I have a GIT repository and I want to calculate how many lines of code were added/changed by one person or a group of persons during some period of time. Is it possible to c
you can do that:
1) Run:
nano contribution.sh
2) fill :
if [ $# -eq 1 ]
then
git log --author=$1 --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' - > logs.txt
cat logs.txt
else
echo "ERROR: you should pass username at argument"
fi
3) Run :
chmod +x contribution.sh
4) Now you can see your contribution with:
./contribution.sh your_git_username