Migrating from Github to Bitbucket

Why

The main reason is that if you have only one collaborator, Bitbucket does not charge you anything. You will be saving $7 / month on this tip alone.

Steps

Step 1

From your Rails app project directory, run:

git remote show origin

or

git config --get remote.origin.url

Step 2

From your Rails app project directory, run:

git remote add origin ssh://[email protected]/your-user-id/your-project.git

Step 3

Add the ssh key of the server to bitbucket SSH keys.

Step 4

Login to the server and from the rails project current directory change the git remote by running the command in step 2.

Summary

In this chapter, you learned how to migrate your git repo from github to bitbucket.