gitでpushしたらpushした先でワーキングツリーをリセット

それhookで出来るよ


cd .git/hooks/
mv post-receive.sample post-receive
chmod +x post-receive
echo 'cd /home/hoge/huga/' >> post-receive
echo 'git --git-dir=.git reset --hard HEAD' >> post-receive