Created
July 17, 2014 09:39
-
-
Save ssv445/fe6789bbd72da4c711ca to your computer and use it in GitHub Desktop.
auto commit folder with changed file as commit message
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 | |
# move to www folder | |
cd /var/www | |
rm -f commit.msg | |
# add files | |
git add . | |
# build commit message | |
echo "AUTO:" > commit.msg | |
git status -s >> commit.msg | |
# commit files | |
git commit -a -F commit.msg | |
# push to github | |
git push origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment