Created
May 11, 2009 21:21
-
-
Save jpf/110196 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Script to automatically backup a git repository (via cron for example). | |
| REPOSITORY="/path/to/repository/" | |
| # Redirect STDIO and STDERR to /dev/null | |
| exec 1> /dev/null | |
| exec 2> /dev/null | |
| cd $REPOSITORY | |
| git add . | |
| git commit -a -m "Automatic commit - `date`" | |
| git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment