thank you for your tutorial, but i faced a problem: after pre-commit hook is copied to .git/hooks by gradle task, it is set to non-executable by default and has to be set to executable manually. I tried automating it with exec task that runs 'chmod +x', but it seems to fail with permission denied error. Is there a solution?
Interesting topic about hooks. Thanks for the excellent explanation.
Happy to hear that!
Yup, hooks are a really simple way to add some automation, checks, and things like that to the project :D
thank you for your tutorial, but i faced a problem: after pre-commit hook is copied to .git/hooks by gradle task, it is set to non-executable by default and has to be set to executable manually. I tried automating it with exec task that runs 'chmod +x', but it seems to fail with permission denied error. Is there a solution?
Hmmm. And is the file named `pre-commit` ?
Alternatively you can check if making #!/bin/sh instead of #!/bin/bash works for you
@@codersee chmod +x pre-commit from your script folders