Joined January 2013
·
Posted to
Install git commit hooks after npm install using grunt
over 1 year
ago
Hi Andreas. I implemented a similar method using grunt-contrib-copy however I found that the copied file was not an executable and as a result was not run by Git. Did you find a similar issue?
Instead I used grunt-shell and copied the pre-commit executable in to .git/hooks like so.
shell: {
hooks: {
command: 'cp git-hooks/pre-commit .git/hooks/'
}
}
Achievements
687 Karma
124,492 Total ProTip Views
Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos
Raven
Have at least one original repo where some form of shell script is the dominant language
Velociraptor
Have at least one original repo where Perl is the dominant language
Nephila Komaci
Have at least one original repos where PHP is the dominant language
Charity
Fork and commit to someone's open source project in need
Thanks for letting me know. I think the author has updated their account name. I've changed it now.