Trying to create a git repo that does an automatic checkout everytime someone updates origin
- by Dane Larsen
Basically, I have a server with a git repo 'origin'. I'm trying to have another repo auto-pull from origin every time someone pushes code to it. I've been using the hooks in origin, specifically post-receive. So far, my post receive looks something like this:
#!/bin/sh
GIT_DIR=/home/<user>/<test_repo>
git pull origin master
But when…