Moving from Bitbucket to Github

Below, is a quick set of commands to safely move your Bitbucket repo to Github; all while keeping history and everything.

Here’s the forked Gist containing the info below if you’d like to reference that instead.

Let’s Get Started

Create a new repo on Github to get started, if you haven’t already.


# Change Origin
git remote rename origin bitbucket

# Update Repo
git remote add origin https://github.com/username/awesome-new-repo.git

# Push to Github (assuming you're using master)
git push -u origin master

# Remove Bitbucket as Remote
git remote rm bitbucket
ender