Skip to content

Prepend branch name to commit message using husky and prepare-commit-msg hook

License

Notifications You must be signed in to change notification settings

mikhailsidorov/husky-prepare-commit-msg-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Husky prepare-commit-msg example

Example project with prepare-commit-msg hook configured to prepend branch name to commit message automaticaly

Requirements

  • bash

Run

npm install
git checkout -b fix/issue-123
touch example.txt
git add .
git commit -m "My new commit"

Commit message will be issue-123 My new commit