GIT Automatic Commits using Cron

Submitted by Janak on Tue, 07/19/2011 - 23:41

most of the time you want your commit messages to be meaningful, neat and sweet message. Sometimes you just want to commit like crazy - more as a backup process.

So, if you ever find yourself in a situation where you must commit automatically, here is how to do it with cron:

Setup Cron

crontab -e

Crontab Command

*/5 * * * * (cd /path/to/myproject && git add . && git commit -m "Automatic Commit")

Done. Happy coding.