The file pre-commit is to be placed in the folder .git/hooks/ It wil prevent making a commit on the branches master, main and production
pre-commit
.git/hooks/