Git pre-commit hook is not running on Windows April 26, 2023 by Tarik Name your hook pre-commit (without any file extension). And add #!/bin/sh on the first line or #!/bin/bash.