哪些地方被改的最多?
git log --format=format: --name-only --since="1 year ago" | sort | uniq -c | sort -nr | head -20
那些人 commits 最多?
git shortlog -sn --no-merges
哪里 bug 多?
git log -i -E --grep="fix|bug|broken" --name-only --format='' | sort | uniq -c | sort -nr | head -20
这个项目更新在变快还是变慢?
git log --format='%ad' --date=format:'%Y-%m' | sort | uniq -c
哪些地方会改的来来回回?
git log --oneline --since="1 year ago" | grep -iE 'revert|hotfix|emergency|rollback'

The Git Commands I Run Before Reading Any Code
Five git commands that tell you where a codebase hurts before you open a single file. Churn hotspots, bus factor, bug clusters, and crisis patterns.
piechowski.io
登录后评论