All commands aren't mine. These have been collected while lurking in the internet.
Commands to judge new codebases
Sources:
WARNING: It takes some experience to know when to draw conclusions from these numbers, and when not to.
Numbers can and will lie. A lot of times.
Find editing hotspots in the codebase.
Files that are edited A LOT often tend to be hairy messes that are painful to touch and modify.
git log --format=format: --name-only --since="1 year ago" | sort | uniq -c | sort -nr | head -50
Get contributors ranked by commit counts. Then find out if the most prolific contributors are still active, or if they have left the project.
git shortlog -sn --no-merges
Find the files most edited during fixes. To find files that cause the most number of problems.
git log -i -E --grep="fix|bug|broken" --name-only --format='' | sort | uniq -c | sort -nr | head -50
Get commit count by month. To get a feel of the project's development - growing, stabilized, dying. Great for finding where the project is in its maturity cycle.
git log --format='%ad' --date=format:'%Y-%m' | sort | uniq -c
Frequency of reverts and hotfixes.
git log --oneline --since="1 year ago" | grep -iE 'revert|hotfix|emergency|rollback'