My husky script:
"husky": {
"hooks": {
"pre-commit": "sh ./tools/githooks/pre-commit.sh"
}
}
Let's say I am doing a git commit -m "I want that text"
.
How can I access to my commit message within the shell script?
I tried to echo $HUSKY_GIT_PARAMS and $HUSKY_GIT_STDIN within the shell script but no success
HUSKY_GIT_PARAMS
is removed in version 5. Instead Git parameters should be used directly in scripts (e.g. $1) . – Sharkskin