Created
September 12, 2014 15:14
-
-
Save virtualstaticvoid/f974ab55f68d768d0171 to your computer and use it in GitHub Desktop.
Git script to quickly add and commit all modified files
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 | |
comment=${1:-"Autosaved at $(date +%Y)-$(date +%m)-$(date +%d) $(date +%H:%M)"} | |
# make sure we're at the root of git repo | |
#if [ ! -d .git ]; then | |
# echo "Error: must run this script from the root of a git repository" | |
# exit 1 | |
#fi | |
echo Autosaving... `pwd` | |
git add --all | |
git commit -m "$comment" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment