Git hooks are being ignored Windows


I am using GitHub Desktop for Windows.

I have created a pre-commit script

git diff --cached --name-status | egrep -i "^(A|M).*\.(inc|pwn)$" | while read a b; do
  sed -i "s/Last Edit:.*$/Last Edit: $(date -u "+%d-%B-%Y %H:%M")/" $b

This works perfectly if I do the commits manually via git commands, but when I use GitHub desktop nothing happens, the hook is ignored.