A streamlined Git hook utility for managing commit co-authors that seamlessly integrates with your existing Git workflow.
# Install tripauthor globally
npm install -g tripauthor
# Initialize tripauthor in your Git repository
npm add --save-dev tripauthor
yarn add --dev tripauthor
By doing this, all repositories will use the global hooks even if they have git hooks configured.
# Setting global hooks path
git config --local core.hooksPath ~/githooks/
# Copy the tripauthor hooks to the global hooks path
# Use `yarn` if you've installed tripauthor locally
echo "exec < /dev/tty && npx tripauthor -f $1` >> ~/githooks/commit-msg
# Set access permissions so that the scripts can be executed by Git
chmod a+x ~/githooks/*
echo "exec < /dev/tty && yarn tripauthor -f $1" > .husky/commit-msg
chmod a+x .husky/commit-msg
npx tripauthor add <name> <email>
# alias
npx tripauthor a <name> <email>
npx tripauthor list
# alias
npx tripauthor l