Add git-authors

This commit is contained in:
Titus Wormer 2015-02-08 10:59:36 +01:00
parent cb2aa2792f
commit 0fd45396ce

View file

@ -3,6 +3,7 @@
- [`git squash`](#git-squash)
- [`git summary`](#git-summary)
- [`git effort`](#git-effort)
- [`git authors`](#git-authors)
- [`git changelog`](#git-changelog)
- [`git commits-since`](#git-commits-since)
- [`git count`](#git-count)
@ -497,6 +498,40 @@ $ git squash HEAD~3
$ git squash HEAD~3 "Work on a feature"
```
## git authors
Populates the file matching `authors|contributors -i` with the authors of commits, according to the number of commits per author.
Opens the file in `$EDITOR` when set.
See the ["MAPPING AUTHORS" section](http://git-scm.com/docs/git-shortlog#_mapping_authors) of **git-shortlog**(1) to coalesce together commits by the same person.
Updating AUTHORS file:
```bash
$ git authors && cat AUTHORS
TJ Holowaychuk <tj@vision-media.ca>
Tj Holowaychuk <tj@vision-media.ca>
hemanth.hm <hemanth.hm@gmail.com>
Jonhnny Weslley <jw@jonhnnyweslley.net>
nickl- <github@jigsoft.co.za>
Leila Muhtasib <muhtasib@gmail.com>
```
Listing authors:
```bash
$ git authors --list
TJ Holowaychuk <tj@vision-media.ca>
Tj Holowaychuk <tj@vision-media.ca>
hemanth.hm <hemanth.hm@gmail.com>
Jonhnny Weslley <jw@jonhnnyweslley.net>
nickl- <github@jigsoft.co.za>
Leila Muhtasib <muhtasib@gmail.com>
```
## git changelog
Populate a file whose name matches `change|history -i_` with commits
@ -664,4 +699,4 @@ $ pwd
.../very-deep-from-root-directory
$ cd `git root`
$ git add . && git commit
```
```