diff options
| -rwxr-xr-x | mac/.local/bin/gitupdate | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mac/.local/bin/gitupdate b/mac/.local/bin/gitupdate index 063a4cd..b36bfe8 100755 --- a/mac/.local/bin/gitupdate +++ b/mac/.local/bin/gitupdate @@ -76,7 +76,12 @@ else # Add and commit changes git add --all . git commit -m "$message" - git pull --rebase $git_current_remote "$branch" + if git remote $git_current_remote | grep -q origin; then + remote="origin" + else + remote=$(git remote $git_current_remote) + fi + git pull --rebase "$remote" "$branch" git remote | xargs -L1 git push --all fi |
