Skip to content

Instantly share code, notes, and snippets.

@travist
Created February 7, 2012 14:50
Show Gist options
  • Save travist/1760058 to your computer and use it in GitHub Desktop.
Save travist/1760058 to your computer and use it in GitHub Desktop.
Using GIT to determine all changes to a file provided a date range.
git log --shortstat --since="3 weeks ago" --until="now" \
| grep "Merge pull request" -B 5\
| awk '{\
if ($1=="commit") {\
output = system("git diff " $2 "^ " $2 " {YOUR FILE HERE}");\
if (output) {\
print output;\
}\
}\
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment