I'm learning about pre-commit hooks and I can't seem to get them to run
I'm running git 2.40.1 on Mac OS Monterey 12.6.5
This is the content of my .git/hooks directory in the root of my demo project
Meanwhile, this is the local .git/config file with hooksPath set correctly
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
hooksPath = .git/hooks
[remote "origin"]
url = ssh://git@bitbucket.XXXXXXXX.com/devops/demo.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[branch "develop"]
remote = origin
merge = refs/heads/develop
At this point, I'd just like the message-test hook to run, which is a super simple HELLO WORLD
#!/bin/sh
echo "Hello world!"
Permissions on my hooks all look to be executable
mac-me Desktop/demo ‹testing-strings-xml-push› » ls -l .git/hooks
total 136
drwxr-xr-x 17 ME staff 544 May 4 16:40 .
drwxr-xr-x 14 ME staff 448 May 11 15:14 ..
-rwxr-xr-x@ 1 ME staff 478 May 4 16:08 applypatch-msg.sample
-rwxr-xr-x 1 ME staff 154 May 4 16:30 block-string-changes
-rwxr-xr-x 1 ME staff 896 May 4 16:08 commit-msg
-rwxr-xr-x 1 ME staff 4726 May 4 16:08 fsmonitor-watchman.sample
-rwxr-xr-x@ 1 ME staff 32 May 4 16:39 message-test
-rwxr-xr-x 1 ME staff 189 May 4 16:08 post-update.sample
-rwxr-xr-x 1 ME staff 424 May 4 16:08 pre-applypatch.sample
-rwxr-xr-x 1 ME staff 1643 May 4 16:08 pre-commit.sample
-rwxr-xr-x 1 ME staff 416 May 4 16:08 pre-merge-commit.sample
-rwxr-xr-x 1 ME staff 1374 May 4 16:08 pre-push.sample
-rwxr-xr-x 1 ME staff 4898 May 4 16:08 pre-rebase.sample
-rwxr-xr-x 1 ME staff 544 May 4 16:08 pre-receive.sample
-rwxr-xr-x 1 ME staff 1492 May 4 16:08 prepare-commit-msg.sample
-rwxr-xr-x 1 ME staff 2783 May 4 16:08 push-to-checkout.sample
-rwxr-xr-x 1 ME staff 3650 May 4 16:08 update.sample
I am baffled, any help very much appreciated thank you!