diff --git a/bash_aliases.sh b/bash_aliases.sh index 40106c8..52725a4 100644 --- a/bash_aliases.sh +++ b/bash_aliases.sh @@ -59,7 +59,7 @@ function bashreload() ( cd "$( dirname "$(realpath -e "${BASH_SOURCE[0]}")" )" needs_push=false - if git add .; git diff-index --cached --quiet HEAD; then + if git add . && ! git diff-index --cached --quiet HEAD; then git commit -am "Autocommitted updated scripts from ${hostname}" needs_push=true fi