The Co-authored-by
commit trailer is the de-facto standard
to attribute a commit to multiple authors 1 2 3 4, useful in particular when practicing
pair/mob/ensemble programming.
git-bottle
is an interactive CLI tool to simplify the usage of Co-authored-by
and other commit trailers.
git bottle
- zero-magic: it just runs
git commit -m <message>
where the message is built from your inputs - zero-friction: you can start using it now, no configuration or changes required in your repository
Oneliner for Linux:
curl -L https://github.com/simonecarriero/git-bottle/releases/download/0.1.0/git-bottle-x86_64-unknown-linux-gnu > git-bottle && \
chmod +x git-bottle && \
sudo mv git-bottle /usr/local/bin/git-bottle
Oneliner for macOS:
curl -L https://github.com/simonecarriero/git-bottle/releases/download/0.1.0/git-bottle-x86_64-apple-darwin > git-bottle && \
chmod +x git-bottle && \
sudo mv git-bottle /usr/local/bin/git-bottle
Change the last part (sudo mv git-bottle /usr/local/bin/git-bottle
) if you prefer to use a different directory in
your $PATH
.
cargo install --git https://github.com/simonecarriero/git-bottle
Configuration is not required. By default, git-bottle
prompts for a message and a multi-selection of Co-authored-by
commit trailers, where the options are taken from the git log.
To customize the behavior, provide a .git-bottle.yml
configuration file in your
repository or in any ancestor folder.
Take a look at the schema of a .git-bottle.yml configuration file or at the following examples:
- Example 1: multi-selection of
Co-authored-by
from the git log (default behavior) - Example 2: multi-selection of
Co-authored-by
from an explicit list of values - Example 3: selection of
Issue
from the last 10 commits in the git log - Example 4: Example 3 + Example 2