diff --git a/fake_home/.zshrc b/fake_home/.zshrc index 500fa95..88236b6 100644 --- a/fake_home/.zshrc +++ b/fake_home/.zshrc @@ -170,19 +170,21 @@ function load-extensions { function pushdot { cd "$DOT_DIR" || return 1 local res - if [ $# -eq 0 ]; then - git commit -a - res="$?" - else - git commit -a -m "$@" - res="$?" - fi - if [[ "$res" == "0" ]]; then - git push -u origin main - push-extensions - sync-history - push-dconf + if ! git diff --quiet; then + if [ $# -eq 0 ]; then + git commit -a + res="$?" + else + git commit -a -m "$@" + res="$?" + fi + if [[ "$res" == "0" ]]; then + git push -u origin main + fi fi + push-extensions + sync-history + push-dconf cd - return $res }