This watches the list of dirs in $repos. Remove mine and add your own. It will watch for changes and then commit and push the result.
To make this run and stay alive, you have to use automator to make an Application script.
Here's a screenshot of what I did: https://stackoverflow.com/questions/6442364/running-script-upon-login-mac
Then you can run this app on login with the plist below.