I have a problem with configuration tslint and pre-commit hook. The point is that i created tsconfig file which work\'s well. And added bash script which not allow me to commit
"Committing a hook" is not possible for security reasons. If you could, then someone just cloning your repo and running basic operations could get arbitrary code executed on their machines.
Two common ways to deal with this are:
Document what people have to do to get the hook operational in their repository.
Automate what people have to do to get it. For example, in a project using a Makefile, I have this in the Makefile and people can just run make setup-pre-push-hook
to get the hook to run "make check" whenever they push:
setup-pre-push-hook: setup-pre-push-hook-file grep -q 'make check' .git/hooks/pre-push || \ printf '\n%s\n\n' 'make check' >> .git/hooks/pre-push setup-pre-push-hook-file: test -f .git/hooks/pre-push || echo '#!/bin/sh' >.git/hooks/pre-push test -x .git/hooks/pre-push || chmod +x .git/hooks/pre-push