aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-11-23 18:36:18 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-11-23 18:36:18 -0200
commit9c0e2bc7618ba72cf00acba77b0e12e22a57144a (patch)
treedfb24d00b63c3017cd794065967f4930b3d1a8ec
parentbf982162dd9b00c7506799ef97c3fc690139cd29 (diff)
downloadutils-git-9c0e2bc7618ba72cf00acba77b0e12e22a57144a.tar.gz
utils-git-9c0e2bc7618ba72cf00acba77b0e12e22a57144a.tar.bz2
Always add a remote
-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