diff options
| -rwxr-xr-x | ar/.local/bin/gitupdate | 7 | ||||
| -rwxr-xr-x | mac/.local/bin/gitupdate | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/ar/.local/bin/gitupdate b/ar/.local/bin/gitupdate index 4fed27e..a2c65ba 100755 --- a/ar/.local/bin/gitupdate +++ b/ar/.local/bin/gitupdate @@ -63,10 +63,6 @@ if [ -n "$changes" ] && [ "$unpushed" -eq 0 ]; then done | tr '\n' ',' | sed 's/,$//;s/,/, /g;s/"$//') fi message="${1:-$default}" - - # Add and commit changes - git add --all . - git commit -m "$message" else message=$(git cherry -v | awk '{$1=$2=""; print $0}' | sed 's/^ *//' | tail -n 1) fi @@ -74,6 +70,9 @@ fi if [ "$repo_root" = "${PASSWORD_STORE_DIR:-${HOME}/.password-store}" ]; then pass git remote | xargs -L1 pass git push --all else + # Add and commit changes + git add --all . + git commit -m "$message" git pull --rebase origin "$branch" git remote | xargs -L1 git push --all fi diff --git a/mac/.local/bin/gitupdate b/mac/.local/bin/gitupdate index a2c83b5..69301b7 100755 --- a/mac/.local/bin/gitupdate +++ b/mac/.local/bin/gitupdate @@ -66,10 +66,6 @@ if [ -n "$changes" ] && [ "$unpushed" -eq 0 ]; then done | tr '\n' ',' | sed 's/,$//;s/,/, /g;s/"$//') fi message="${1:-$default}" - - # Add and commit changes - git add --all . - git commit -m "$message" else message=$(git cherry -v | awk '{$1=$2=""; print $0}' | sed 's/^ *//' | tail -n 1) fi @@ -77,6 +73,9 @@ fi if [ "$repo_root" = "${PASSWORD_STORE_DIR:-${HOME}/.password-store}" ]; then pass git remote | xargs -L1 pass git push --all else + # Add and commit changes + git add --all . + git commit -m "$message" git pull --rebase origin "$branch" git remote | xargs -L1 git push --all fi |
