0

As apart of pre-commit hook i want to run a python script that returns a success value to a hook

some thing like that:

pre-commit hook

result=python test.py
if result exit 0

test.py

..running some tests...
return 1

is there any way to do that ?

thank you

aGuy
  • 83
  • 5
  • You can write your Git hook in any language you like, provided your OS will let Git `exec` the hook directly. As to *how* to write a hook in some particular language, that's a question about programming in that language, not about Git. – torek Nov 19 '18 at 09:12
  • Figure it out thanks – aGuy Nov 19 '18 at 09:47

1 Answers1

0

By defining apython script file as a hook it possible to use a python script as a hook

aGuy
  • 83
  • 5