Skip to content

Instantly share code, notes, and snippets.

@ssv445
Created July 17, 2014 09:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssv445/fe6789bbd72da4c711ca to your computer and use it in GitHub Desktop.
Save ssv445/fe6789bbd72da4c711ca to your computer and use it in GitHub Desktop.
auto commit folder with changed file as commit message
#!/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