Make Git pull update automatically
I have a GIT a copy in my cpanel account. How do I get GIT to pull fresh files every 24 hours or when files change on on GIT to update my local copy?
Can you do this with cron?
-
I think I'm on to something here. I test this at a terminal as the user: cd ${HOME}/repositories/IP-Lists; git fetch An it fetched the files from the remote git repositories placing them in the local. So I think I can make a crontab like this: cd ${HOME}/repositories/IP-Lists; git fetch or if I want no output emailed: cd ${HOME}/repositories/IP-Lists; git fetch > /dev/null 2>&1 Thanks for looking. 0 -
Hey there! That sounds like it should work, but you wouldn't want to use the "cd" command in cron as that usually doesn't work well. 0 -
Hey there! That sounds like it should work, but you wouldn't want to use the "cd" command in cron as that usually doesn't work well.
Thanks. Can you be more clear about the CD command. It works or does not work, what does does not work well mean?0 -
Oooooooh, I understand now. :) Thanks. 0
Please sign in to leave a comment.
Comments
5 comments