Skip to content

Instantly share code, notes, and snippets.

@IamPhytan
Created July 10, 2020 00:59
Show Gist options
  • Save IamPhytan/af4aef7c76c94add34a988664b0ea077 to your computer and use it in GitHub Desktop.
Save IamPhytan/af4aef7c76c94add34a988664b0ea077 to your computer and use it in GitHub Desktop.
Small script to change a Git repo remote URL easily
# 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