How to set up a Git hook so that after pushing to ssh://peter@foo.com/~/bar.com.git, it will go to ~/bar.com and do a git pull?
问题 I was advised to set up on a remote server foo.com/~/bar.com # live webpage content foo.com/~/bar.com.git # a bare repo so, from my local machine, I can do a git push and it will push to foo.com/~/bar.com.git on the remote machine (the full path is ssh://peter@www.foo.com/~/bar.com.git How can a hook be added, so that after the push, the remote server will cd ~/bar.com and do a git pull so that all content is updated (the same as the local machine)? (no need to run git update like for