Skip to content

Commit

Permalink
Useful command to check number of lines added and removed by an author
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Passos committed Jun 29, 2015
1 parent bdac92e commit f9bdaa7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,9 @@ $ git checkout -- filename

# Shows more detailed info about a commit
$ git cat-file sha -p

# Show number of lines added and removed from a repository by an author since some time in the past.
$ git log --author="Author name" --pretty=tformat: --numstat --since=month | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }'
```

#### Useful alias
Expand Down
4 changes: 4 additions & 0 deletions translation/README.pt-br.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,10 @@ $ git checkout -- nomedoarquivo

# Mostra informações mais detalhadas sobre um commit
$ git cat-file sha -p

# Mostra o número de linhas adicionadas e removidas em um repositório por um autor desde uma data no passado até o presente

$ git log --author="Nome do autor" --pretty=tformat: --numstat --since=mes | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }'
```

#### Alias úteis
Expand Down

0 comments on commit f9bdaa7

Please sign in to comment.