Skip to content

Instantly share code, notes, and snippets.

@radjivF
Created March 21, 2018 06:54
Show Gist options
  • Save radjivF/f817cee8eae66a981171c1060360411d to your computer and use it in GitHub Desktop.
Save radjivF/f817cee8eae66a981171c1060360411d to your computer and use it in GitHub Desktop.
git-reremote
#!/bin/sh
old=radjivC
new=radjivF
git remote -v | grep $old | while read name url type; do
newurl=`echo $url | sed -e "s/$old/$new/"`
git remote set-url $name $newurl
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment