In this example, the Panoramic Data "Toggl.Api" was moved from Bitbucket to Github:
cd f:\projects\Toggl.Api
git pull
git remote add upstream git@github.com:panoramicdata/Toggl.Api.git
git push upstream develop
git push --tags upstream
then...
- Double check that the Github repository has all content
- Go to the web interface of the old Bitbucket repository
- Select menu option Setting > Delete repository
- Add the URL of the new Github repository as redirect URL
Finally, to clean up:
git remote remove origin
git remote rename upstream origin