Friday 8 January 2021

Moving a repository from Bitbucket to Github

 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...

  1. Double check that the Github repository has all content
  2. Go to the web interface of the old Bitbucket repository
  3. Select menu option Setting > Delete repository
  4. Add the URL of the new Github repository as redirect URL
Finally, to clean up:

git remote remove origin
git remote rename upstream origin


No comments:

Post a Comment