|
1 | 1 | # git-coauthor |
2 | | -Simple and dependency-free coauthor support porcelain for git. |
| 2 | +Simple multiple author support porcelain for git. Written in pure Bash. |
3 | 3 |
|
4 | 4 | ## Installation |
5 | | -brew install simoleone/tap/git-coauthor |
| 5 | +`brew install simoleone/tap/git-coauthor` |
6 | 6 |
|
7 | 7 | ## Usage |
8 | | -Add your friends and colleagues, and probably yourself. |
9 | | -```bash |
10 | | -git coauthor add "Cool Person <me@example.com>" |
11 | | -git coauthor add "Linux Penguin <penguin@example.com>" |
12 | | -git coauthor add "Jane Smith <jane@example.com>" |
13 | 8 | ``` |
| 9 | +git coauthor |
| 10 | + display current coauthors and this usage message |
14 | 11 |
|
15 | | -Set up a pair or mob. You can use initials or any matching substring (first match wins). |
16 | | -```bash |
17 | | -git coauthor pair cp js |
18 | | -git coauthor pair cool smith |
19 | | -``` |
| 12 | +git coauthor <initials or name> ... |
| 13 | + set current co-authors to developers with matching initials or names |
20 | 14 |
|
21 | | -Commit as usual. The commit message will be pre-populated with the selected authors. |
22 | | -```bash |
23 | | -git commit |
24 | | -``` |
| 15 | +git coauthor --solo |
| 16 | + remove current co-authors and go solo |
| 17 | +
|
| 18 | +git coauthor --add "Jane Smith <jane@example.com>" |
| 19 | + add a new author to the database |
| 20 | +
|
| 21 | +git coauthor --ls |
| 22 | + list all authors in the database |
25 | 23 |
|
26 | | -Done pairing? Easy. |
27 | | -```bash |
28 | | -git coauthor solo |
| 24 | +git coauthor --rm <initials or name> |
| 25 | + remove author with matching initials or name from the database |
29 | 26 | ``` |
30 | 27 |
|
31 | 28 | ## Why? |
32 | | -Github announced support in January 2018. Pairing is a great way to get things done, and |
33 | | -everyone gets credit in commit graphs as well as in Github's UI. |
| 29 | +Github announced support for `Co-authored-by:` trailers for git commits in January 2018. |
| 30 | +Pairing is a great way to get things done, and everyone gets credit in commit graphs as |
| 31 | +well as in Github's UI by using this method. So basically, this is great. |
| 32 | + |
| 33 | +There are a number of existing solutions to this problem out there, but all of them fall a little |
| 34 | +bit short for one reason or another. The goals of this project are simple: |
| 35 | + |
| 36 | +* No external dependencies (no node, ruby, etc). Should only depend on Bash and Git. |
| 37 | +* Integration with git built-in porcelains. `git commit` should "just work". |
| 38 | +* No munging of author (and do not interfere with gpg commit signing). Use only the Co-authored-by trailer. |
| 39 | + |
| 40 | +## See Also |
| 41 | +* [github help](https://help.github.com/articles/creating-a-commit-with-multiple-authors/) about multiple authors. |
| 42 | +* [github blog](https://blog.github.com/2018-01-29-commit-together-with-co-authors/) announcing support for co-authored-by. |
34 | 43 |
|
35 | | -### See Also |
36 | | -* [github help](https://help.github.com/articles/creating-a-commit-with-multiple-authors/) |
37 | | -* [github blog](https://blog.github.com/2018-01-29-commit-together-with-co-authors/) |
| 44 | +## Prior Art |
| 45 | +* [chrisk/git-pair](https://github.com/chrisk/git-pair) (depends on ruby, munges author name and email) |
| 46 | +* [findmypast-oss/git-mob#readme](https://github.com/findmypast-oss/git-mob#readme) (depends on node) |
| 47 | +* [pivotal/git_scripts]()https://github.com/pivotal/git_scripts#git-pair) (depends on ruby, munges author name and email) |
| 48 | +* [git-duet/git-duet](https://github.com/git-duet/git-duet) (mungest author name and email, does not integrate git commit) |
0 commit comments