diff --git a/bash_aliases.sh b/bash_aliases.sh index f9b95b0..6204bf4 100644 --- a/bash_aliases.sh +++ b/bash_aliases.sh @@ -49,6 +49,7 @@ function copy_func() function sync_git_only() { + ( cd "$( dirname "$(realpath -e "${BASH_SOURCE[0]}")" )" if git add . && ! git diff-index --cached --quiet HEAD; then git commit -am "Autocommitted updated scripts from $(hostname)"