Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support including authors as Co-authored-by #46

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
target
.idea
123 changes: 113 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ edition = "2018"
[dependencies]
error-chain = "0.10"
git2 = "0.7"
tempfile = "3.1.0"
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Soloing and mobbing are automatically set by the number of authors passed to
that the author/committer roles are fairly spread across the pair/mob over
time.

### Aliases
Aliases are supported as well. You can make git-together do its thing when you
use an alias for a committing command by configuring a comma-separated list of
aliases:
Expand All @@ -75,6 +76,20 @@ git config git-together.aliases ci,rv,m
git ci
```

### Co-Author support
If you prefer to use the `Co-authored-by` flag [created by GitHub](https://help.github.com/en/github/committing-changes-to-your-project/creating-a-commit-with-multiple-authors),
there is an experimental command to enable that:

```bash
git config git-together.co-authored 1
```

This will add `Co-authored-by` lines for all authors (except the primary) to your
commit messages. It is _strongly_ recommended that you do not mix different message
styles, e.g., using `-F- -m 'foo' -F /foo/bar` as this will have unpredictable
results.

### Author rotation
By default, `git-together` sets and rotates pairs for a single local
repository. If you are working across multiple repos with a pair on a regular
basis, this can be difficult to set across all of them. The `--global` flag can
Expand Down
7 changes: 6 additions & 1 deletion src/errors.rs
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
error_chain! {}
error_chain! {
foreign_links {
Fmt(::std::fmt::Error);
Io(::std::io::Error);
}
}
Loading