I was trying to create a cronjob with a task to do a git pull
every minute to keep my production site in sync with my master branch.
The git pull needs
*/1 * * * * su -s /bin/sh nobody -c 'cd /home/heilee/src/project && /usr/bin/git pull origin master'
This corrects a couple errors that prevented the accepted answer from working on my system (Ubuntu >10.04 server). The key change seems to be the -q
after the pull
rather than before. You won't notice that your pull isn't working until you tail the /var/log/syslog
file or try to run your non-updated production code.