aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-remote-all7
1 files changed, 4 insertions, 3 deletions
diff --git a/git-remote-all b/git-remote-all
index 496cc21..e6bd4bd 100755
--- a/git-remote-all
+++ b/git-remote-all
@@ -32,10 +32,11 @@ for remote in $*; do
echo "Adding $url as a pushurl for remote 'all'..."
- # Add current remote as a push URL for remote 'all'
+ # Ensure remote exists
if ! git remote get-url --push all &> /dev/null; then
git remote add all $url
- else
- git remote set-url --add --push all $url
fi
+
+ # Add current remote as a push URL for remote 'all'
+ git remote set-url --add --push all $url
done