The Git Commands I Run Before Reading Any Code - some interesting simple queries on a git repository to gain some understanding on development patterns
Most changed files in the last year:
git log --format=format: --name-only --since="1 year ago" | sort | uniq -c | sort -nr | head -20
List of contributors:
git shortlog -sn --no-merges
Example of looking for hot words in comment messages:
git log -i -E --grep="fix|bug|broken" --name-only --format='' | sort | uniq -c | sort -nr | head -20
Time line of commits:
git log --format='%ad' --date=format:'%Y-%m' | sort | uniq -c
Another example of comment keyword searches:
git log --oneline --since="1 year ago" | grep -iE 'revert|hotfix|emergency|rollback'
Hacker News - referenced


