Skip to content

Instantly share code, notes, and snippets.

@DevWellington
Last active August 29, 2015 14:05
Show Gist options
  • Save DevWellington/a8e4ab310454c0249715 to your computer and use it in GitHub Desktop.
Save DevWellington/a8e4ab310454c0249715 to your computer and use it in GitHub Desktop.
Resumo do dia trabalhado no Git
Considere utilizar o clear; antes do comando (clear; git log --sin...)
## Analitico do dia
git log --since=8.hours --stat --pretty=oneline | grep "insertion" | awk -F' ' '{print "Arquivos: " $1 " - Linhas: " $4 }';
Exemplo de retorno:
Arquivos: 1 - Linhas: 2
Arquivos: 52 - Linhas: 2543
Arquivos: 3 - Linhas: 321
Arquivos: 4 - Linhas: 84
Arquivos: 1 - Linhas: 58
## Resumo do dia
git log --since=8.hours --stat --pretty=oneline | grep "insertion" | awk -F' ' '{files+=$1; lines+=$4 } END {print "Hoje voce trabalhou em " files " arquivos e " lines " Linhas."}';
Exemplo de retorno:
Hoje voce trabalhou em 61 arquivos e 3008 Linhas.
## Forma visual do codigo
git log
--since=8.hours
--stat
--pretty=oneline
| grep "insertions"
| awk -F' '
'{
files+=$1;
lines+=$4
} END {
print
"Hoje voce trabalhou em "
files
" arquivos e "
lines
" Linhas."
}
';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment