I try to implement client side git hooks to a azure devops git repository.
I added a .githooks directory to the root and implement a pre-commit hook. I commit and push everything to the repository.
But of curse the hook is only active if I execute
git config core.hooksPath .githooks
after cloning the repository.
The question is here: is there a possiblity to set the git config core.hooksPath per default to .githooks otherwise it will be impossible to force a user to use a hook. :/
The question is here: is there a possiblity to set the git config core.hooksPath per default to .githooks otherwise it will be impossible to force a user to use a hook. :/
Sorry but I'm afraid it's impossible for now, as I know Azure Devops doesn't support such behavior. I totally understand your needs but what you want is not available in either Azure Devops Git Repos or Github Repos.
Currently you have to make your members run the git config core.hooksPath .githooks command manually to enable your custom hooks. We can't avoid a manual step here cause git hooks is designed to trigger actions at certain points per user instead of per team.
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