Created
July 10, 2020 00:59
-
-
Save IamPhytan/af4aef7c76c94add34a988664b0ea077 to your computer and use it in GitHub Desktop.
Small script to change a Git repo remote URL easily
This file contains 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
# use : remren_git <ssh-url> | |
if [ "x$1" != "x" ] | |
then | |
git remote rename origin old-origin; | |
git remote add origin $1; | |
git push -u origin --all; | |
else echo "No arguments"; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment