Skip to content

Instantly share code, notes, and snippets.

@yoshimov
Created May 15, 2014 10:06
Show Gist options
  • Select an option

  • Save yoshimov/9837938e4f46edfb9ed4 to your computer and use it in GitHub Desktop.

Select an option

Save yoshimov/9837938e4f46edfb9ed4 to your computer and use it in GitHub Desktop.
crontab for synchronizing git repositories every 2 hours.
0 */2 * * * cd /home/hoge/git && (git pull && git push) 2>&1 | grep -v 'up-to-date' | mail -E'set nonullbody' -s "title" somebody@gmail.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment