I am team of 4 members, we have have git repo in azure devOps, I am given task to add git hook(scan code for indentation, unwanted spaces etc). I know git hook must be added to ./.git/hooks, I have scripts ready. But how do I ensure my other teammates receive my script in their local repo, so code check is done before they commit new files.
FYI, any changes made .git will remain only to local repo, but what is the easiest way that my git hook is passed onto all my team members?
The problem with such a hook is that it is a client-side hook, which involves a deployment to all user.
This differs from a server-side hook, which is modified once, and applied for every user git push to said server.
In my case, I ask my users to make a symlink from their .git/hooks/pre-commit file to a file managed in the repository.
That way, updating that file is easy and applied automatically.
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