Pre-commit hooks just doesn't work in Windows. I tried all the possible ways found in this link: Git hook not running on windows
I have my pre-commit file inside .git/hooks/pre-commit:
#!/bin/bash
echo "Hello, World!"
Steps I followed to test:
- Updated a file
git add .git commit - m "test"
I tried both sh and bash but still no luck. What could be wrong? How to fix this?