summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xar/.local/bin/gitupdate7
-rwxr-xr-xmac/.local/bin/gitupdate2
2 files changed, 7 insertions, 2 deletions
diff --git a/ar/.local/bin/gitupdate b/ar/.local/bin/gitupdate
index 1583de6..6ee163a 100755
--- a/ar/.local/bin/gitupdate
+++ b/ar/.local/bin/gitupdate
@@ -73,7 +73,12 @@ else
# Add and commit changes
git add --all .
git commit -m "$message"
- git pull --rebase $git_current_remote "$branch"
+ if git remote | grep -qx origin; then
+ remote=origin
+ else
+ remote=$(git remote | head -n 1)
+ fi
+ git pull --rebase "$remote" "$branch"
git remote | xargs -L1 git push --all
fi
diff --git a/mac/.local/bin/gitupdate b/mac/.local/bin/gitupdate
index 82fa58b..692a365 100755
--- a/mac/.local/bin/gitupdate
+++ b/mac/.local/bin/gitupdate
@@ -81,7 +81,7 @@ else
else
remote=$(git remote | head -n 1)
fi
- git pull --rebase $remote "$branch"
+ git pull --rebase "$remote" "$branch"
git remote | xargs -L1 git push --all
fi