diff --git a/Commands.md b/Commands.md index 452d879..63f4039 100644 --- a/Commands.md +++ b/Commands.md @@ -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 Holowaychuk +hemanth.hm +Jonhnny Weslley +nickl- +Leila Muhtasib +``` + +Listing authors: + +```bash +$ git authors --list + +TJ Holowaychuk +Tj Holowaychuk +hemanth.hm +Jonhnny Weslley +nickl- +Leila Muhtasib +``` + ## 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 -``` +``` \ No newline at end of file