diff options
| -rwxr-xr-x | mac/.local/bin/gitupdate | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mac/.local/bin/gitupdate b/mac/.local/bin/gitupdate index 0a7abb6..77415c6 100755 --- a/mac/.local/bin/gitupdate +++ b/mac/.local/bin/gitupdate @@ -76,10 +76,10 @@ else # Add and commit changes git add --all . git commit -m "$message" - if $(git remote $git_current_remote | grep -q origin); then - remote="origin" + if git remote -v | grep -qx origin; then + remote=origin else - remote=$(git remote $git_current_remote) + remote=$(git remote -v | head -n 1) fi git pull --rebase $remote "$branch" git remote | xargs -L1 git push --all |
