Today I try run this script on my windows machine: install-pre-commit-hook.sh and noticed it is printing some error "??? NO Such ?????" though if flashed out.
I googled how to prevent shell script cmd closing and luckily found "sleep x" could let the window stay. And finally I found the script stop after:
cd "$(git rev-parse --git-dir)/hooks"
I open .git folder in the project and can't find any hooks folder there. I think that's why "NO SUCH ???" error raised.
I created one manually there and then run the script again. Now I can find something new in the new folder.
I never delete any folder in .git folder so not sure why the hooks folder is not there. But please add following code before cd to make sure it works:
mkdir -p "$(git rev-parse --git-dir)/hooks"