Created
March 21, 2016 21:45
-
-
Save stefanthoss/20f41ab97d9ba19cac9b to your computer and use it in GitHub Desktop.
Shell script to automatically commit all new/modified/deleted files in a Git repository. Can be used as a backup tool with cron.
This file contains 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 | |
cd /path/to/git/repo/ | |
git add -A | |
git commit -m "Backup on `date`" | |
git push origin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment