Here is the script that ultimately worked. I think the bit I was originally missing that prevented it from working remotely was the unset GIT_DIR
#!/bin/sh
cd /path/to/working-copy/ || exit
unset GIT_DIR
git pull repo branch
exec git-update-server-info
More Related Contents:
- Deploy a project using Git push
- Can Git hook scripts be managed along with the repository?
- Putting Git hooks into a repository
- How can I automatically push after committing in Git?
- How do I properly git stash/pop in pre-commit hooks to get a clean working tree for tests?
- Applying a git post-commit hook to all current and future repositories
- Make Git automatically remove trailing white space before committing
- Skip Git commit hooks
- How can I automatically deploy my app after a git push ( GitHub and node.js)?
- git hooks : is there a clone hook?
- Git hook to send email notification on repo changes
- Local executing hook after a git push?
- Can a Git hook automatically add files to the commit?
- change default git hooks
- Git remote/shared pre-commit hook
- How do I react to new tags in git hooks?
- Is there a way to trigger a hook after a new branch has been checked out in Git?
- Tracking changes to hooks in .git/hooks
- Is there a way to lock individual files or directories on fork when using git?
- How would I write a pre-merge hook in Git?
- Local executing hook after a git push? (post-push)
- how to process files on a branch in post-receive hook in git
- update package.json version automatically
- Egit hooks do not get triggered
- Using GIT to deploy website
- Calling ‘git pull’ from a git post-update hook
- How do I “git blame” a deleted line?
- How to see the changes between two commits without commits in-between?
- Heroku: How to push different local Git branches to Heroku/master
- What is git actually doing when it says it is “resolving deltas”?