Git intercepting messages after update doesn't work
I want my git server to be able to checkout automatically, so I try to use .git / Hooks / after updating the content
#!/bin/bash
cd /htdocs
git reset --hard HEAD
but it didn't work so I created a script on my server that includes such a command and in the "post-update" file I wrote
/bin/bash /cron/git #git is the script
when i run the script in bash it works, but when i push to git it doesn't work.
the git version on my server is 2.4.0 and I am using centos 6 x64 the script permission is 4755 and owned by root: root permission. / git is 750 and refers to git: git
+3
source to share