Skip to content

Instantly share code, notes, and snippets.

Forked from sangeeths/github-to-bitbucket
Created July 27, 2019 08:23
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save EdwardDiehl/28555b7288fb57fe15f0db00a6e63b77 to your computer and use it in GitHub Desktop.
Forking a Github repo to Bitbucket
Go to Bitbucket and create a new repository (its better to have an empty repo)
git clone
cd myforkedrepo
Now add Github repo as a new remote in Bitbucket called "sync"
git remote add sync
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync"
git remote -v
Now do a pull from the "master" branch in the "sync" remote
git pull sync master
Setup a local branch called "github"track the "sync" remote's "master" branch
git branch --set-upstream github sync/master
Now push the local "master" branch to the "origin" remote in Bitbucket.
git push -u origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment