diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-12-25 23:09:42 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-12-25 23:09:42 +0900 |
| commit | 99118feb2debc79f44f53366b7ab706d384a2313 (patch) | |
| tree | 28ffb5f1b13248ba0c0ddf3141f98edb5b6248cc | |
| parent | 0243e287d7d5ce96d7353298ba1373c709bbdbe3 (diff) | |
| -rwxr-xr-x | ar/.local/bin/gitupdate | 7 | ||||
| -rwxr-xr-x | mac/.local/bin/gitupdate | 2 |
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 |
