1 - Go to Github and create a new "empty" repository, e.g: graphql-blog-api
2 - Clone the repository locally
git clone [email protected]:plinionaves/graphql-blog-api.git
cd graphql-blog-api
3 - Now add Bitbucket repo as a new remote in Github called "sync" (or "upstream")
git remote add sync [email protected]:plinionaves/graphql-blog-api.git
4 - Verify what are the remotes currently being setup for "graphql-blog-api". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync"
git remote -v
5 - Now do a pull from the "master" branch in the "sync" remote (pulling from Bitbucket)
git pull sync master
6 - Setup a local branch called "bitbucket" to track the "sync" remote's "master" branch
git branch --track bitbucket sync/master
7 - Now push the local "master" branch to the "origin" remote in Github.
git push -u origin master
Reference: https://gist.github.com/sangeeths/9467061