Skip to content

Commit a4f4127

Browse files
committed
Update readme
1 parent 701b634 commit a4f4127

2 files changed

Lines changed: 40 additions & 24 deletions

File tree

README.md

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,48 @@
11
# git-coauthor
2-
Simple and dependency-free coauthor support porcelain for git.
2+
Simple multiple author support porcelain for git. Written in pure Bash.
33

44
## Installation
5-
brew install simoleone/tap/git-coauthor
5+
`brew install simoleone/tap/git-coauthor`
66

77
## 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>"
138
```
9+
git coauthor
10+
display current coauthors and this usage message
1411
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
2014
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
2523
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
2926
```
3027

3128
## 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.
3443

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)

git_coauthor.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#!/bin/bash
2+
#
3+
# A git porcelain to add co-authored-by trailers to git commits
4+
# and manage a database of authors.
5+
#
6+
# I live at https://github.com/simoleone/git-coauthor
27

38
readonly COMMIT_TEMPLATE="${HOME}/.git_coauthor_commit_template"
49

0 commit comments

Comments
 (0)