Git Hook with Husky

Coauthors in commit message

Copy & Paste

.husky/prepare-commit-msg
npx coauthors

Just Commit. That's all 🎉

Add your Co-Author's username of GitHub at the end of the commit message. like coauthors: <Co-Author>, <Co-Author>...

git commit -m "feat: add some feature
 
coauthors: manudeli, 2-NOW(Whale)"

This git hook will convert commit message automatically like below

feat: add some feature
 
Co-authored-by: Jonghyeon Ko <61593290+manudeli@users.noreply.github.com>
Co-authored-by: Whale <71202076+2-NOW@users.noreply.github.com>

Prerequisites