-
-
Save aliakhtar/452d99345b7f89da0340d4b3aae6e1ab to your computer and use it in GitHub Desktop.
Git - calculate how many lines of code were added/changed by someone
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run this in the project repo from the command-line | |
# http://stackoverflow.com/a/4593065/99923 | |
git log --shortstat --author "Xeoncross" --since "2 weeks ago" --until "1 week ago" | grep "files changed" | awk '{files+=$1; inserted+=$4; deleted+=$6} END {print "files changed", files, "lines inserted:", inserted, "lines deleted:", deleted}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To check within a specific folder, and only in last week:
git log --shortstat --author "ali" --since "1 week ago" "./src/main/scala" | grep "files changed" | awk '{files+=$1; inserted+=$4; deleted+=$6} END {print "files changed", files, "lines inserted:", inserted, "lines deleted:", deleted}'