How to move your old repo to github

Before you begin, you might want to add your ssh key into your github account.

// push master branch
$ cd /repo-directory
$ git remote rename origin bitbucket
$ git remote add origin https://github.com/username/awesome-new-repo.git
$ git push origin master
$ git remote rm bitbucket

// push another branch
$ git checkout develop
$ git push origin -u develop

Leave a Comment