Last active
August 29, 2015 14:12
-
-
Save vasi/ce09e4c285fc146913a5 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/sh | |
| dir="$1" | |
| cd "$dir" | |
| # Add new or changed files | |
| git ls-files --exclude-standard -o -m -z | xargs -0r git add | |
| # Commit changes, if any | |
| if ! git diff --cached --quiet; then | |
| git commit --quiet -am "Autocommit at $(date)" | |
| git push --quiet | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment