I am working in big project with many repositories with many branches and people who works with them. We have commit message standard but people are people and sometimes make this commit massages incorrect. That's why i create a git commit hook and now i need some how to install it on all users local repositories.
So the question is it possible to install this commit hook automatically not to ask users about it?
So the question is it possible to install this commit hook automatically not to ask users about it?
It's not. Being able to automatically install scripts on a machine that will run without any intervention from the user is a substantial security issue, which is why there is no facility to do this.
There are a few things you can do:
Provide a script in the repository that will configure your git hooks, and provide instructions to run the script after cloning the repository.
Implement enforcement policies on your git server, so that if someone tries to push a change that doesn't meet your standards it will be rejected. This will encourage people to install your local hooks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With