I am working on a post receive hook to stop commits if the file extension doesn't respect the naming convention (extension need to be in upperCase/ and necessarily .PSK or .PBK), the problem I am facing : when I change test.txt to test.PSK by
git mv -f test.txt test.PSK
git commit --amend
git push -u origin master
GIT doesn't recognize that the extension changed and the hook returns the same error. because git commit --amend
understand that test.txt is deleted and that there's a new file test.PSK