Comandos Git Úteis

Navegando pelo hackernews hoje, me deparei com um post sobre comandos git úteis, e resolvi compartilhar aqui também.

O post original é The Git Commands I Run Before Reading Any Code

Comandos

Aqui embaixo coloco os comandos que o autor escreveu, e mais alguns que eu acho úteis.

Arquivos que mais mudam no projeto

git log --format=format: --name-only --since="1 year ago" | sort | uniq -c | sort -nr | head -20

Quem mais comittou no projeto

git shortlog -sn --no-merges

Arquivos que mais tiveram bugs

git log -i -E --grep="fix|bug|broken" --name-only --format='' | sort | uniq -c | sort -nr | head -20

Commits por mês / Projeto acelerando ou morrendo

git log --format='%ad' --date=format:'%Y-%m' | sort | uniq -c

Reverts e Hotfixes

git log --oneline --since="1 year ago" | grep -iE 'revert|hotfix|emergency|rollback'