#commit #configuration #address #correct #shell #reminds

app commit-email

A tool that reminds you to commit with the correct email address

3 unstable releases

0.2.1 Mar 6, 2024
0.2.0 Nov 16, 2021
0.1.0 Apr 27, 2021

#101 in Email

MIT license

14KB
298 lines

commit-email

A tool that reminds you to commit with the correct email address

Installation

Arch Linux

commit-email is available on the AUR. Afterwards add the shell script to your shell configuration.

Other

Use cargo to install commit-email.

cargo install commit-email

Afterwards add the shell script to your shell configuration.

Shell Script

This script runs commit-email every time you run git commit.

function git() {
  if [ "$1" = "commit" ]
  then
    # Path to commit-email binary (Arch)
    /usr/bin/commit-email
    # Path to commit-email binary (Cargo)
    # $HOME/.cargo/bin/commit-email
  fi;
  command git $@
}

Configure

If you want do adjust the config file for the commit-email tool, you will find the configs in the following path ~/.config/commit-email/commit-email.toml (linux).

# List of repo urls where the tool will not set a commit email
ignore = []

# Emails the tool will use
emails = [
    'email@example.com',
    'email2@example.com'
]

The tool will also use your global git email, if set (e.g. in your global .gitconfig).

Dependencies

~18–32MB
~475K SLoC