Skip to content

Instantly share code, notes, and snippets.

@jadaradix
Last active September 23, 2015 11:18
Show Gist options
  • Save jadaradix/5a9be1bf7e7e101be8dd to your computer and use it in GitHub Desktop.
Save jadaradix/5a9be1bf7e7e101be8dd to your computer and use it in GitHub Desktop.
Renaming a GitHub organisation with a folder of repos referencing the old remote.
for i in $(/usr/bin/find $(pwd) -maxdepth 1 -type d); do
if [ $(pwd) != $i ]
then
cd "${i##*/}";
git remote set-url origin "git@github.com:OrganisationName/${i##*/}.git"
git remote -v;
cd ..;
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment