Last active
January 3, 2016 05:58
-
-
Save amercier/8419072 to your computer and use it in GitHub Desktop.
bash <(curl -# -L https://gist.github.com/amercier/8419072/raw)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [ "$(git remote | grep source | wc -l)" != "0" ]; then | |
echo "$0: a remote called 'source' already exists" >&2 | |
exit 1 | |
fi | |
echo -n "Source Git repo URL: " | |
read url | |
git remote add source $url \ | |
&& git remote set-url --push source no-pushing \ | |
&& git remote -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment