# How to migrate GitLab/Bitbucket to GitHub in a simple way

DevFeed: [How to migrate GitLab/Bitbucket to GitHub in a simple way](<https://devfeed.tech/articles/how-to-migrate-gitlab-bitbucket-to-github-in-a-simple-way-23102.md>)

Original publisher: [Read original article](<https://medium.com/android-news/how-to-migrate-gitlab-bitbucket-to-github-in-a-simple-way-e38bc60b1547?source=rss----8fca399d4de---4>)

Author: Quang Nguyen

Published: 2020-04-15T12:55:23Z

Content type: tutorial

Language: en

Sources: [Android & Tech News -- Medium](<https://devfeed.tech/sources/android-tech-news-medium.md>)

Topics: [GitHub](<https://devfeed.tech/topics/github.md>), [bitbucket](<https://devfeed.tech/topics/bitbucket.md>), [GitLab](<https://devfeed.tech/topics/gitlab.md>), [Git](<https://devfeed.tech/topics/git.md>), [hosting](<https://devfeed.tech/topics/hosting.md>)

Tags: [bitbucket](<https://devfeed.tech/tags/bitbucket.md>), [git](<https://devfeed.tech/tags/git.md>), [github](<https://devfeed.tech/tags/github.md>), [gitlab](<https://devfeed.tech/tags/gitlab.md>), [hosting](<https://devfeed.tech/tags/hosting.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [ssh](<https://devfeed.tech/tags/ssh.md>)

## AI overview

A tutorial explains how to migrate a repository from Bitbucket or GitLab to GitHub by creating an empty GitHub repository, changing the local remote URL, pushing the code and commit history, and optionally archiving the original repository as read-only.

## Source excerpt

Checkout my latest app: Tinido. GitHub has just announced a happy news today for us, developers. "Teams on GitHub can create unlimited private repositories for free." So, here are their newest updates on the free package. Screenshot was taken on April 15th, 2020. Source (https://github.com/pricing) These changes are so competitive to other code hosting services like Bitbucket or GitLab. Many teams are going to relocate their projects to GitHub as I think. If you share the same idea and look for a simple way to migrate a repo from Bitbucket or GitLab, the followings are several simple steps to accomplish this. Inside your GitHub team page, create an empty private repo with the same name of Bitbucket/GitLab repo that you want to transfer. Copy your newly created repo link, either in HTTPS or SSH. For example, git@github.com:team-name/repo-name.git (SSH type) Inside your local project folder, change the remote URL under.git/config 's file to your copied GitHub's one. The content looks similar as follows. [remote "origin"] url = git@github.com:team-name/repo-name.git fetch = +refs/heads/*:refs/remotes/origin/* Do a git push: git push --all . It will push all codes and commit history on your newly GitHub repository. Done. After that, when we push new commits, it will push to GitHub only. The Bitbucket/GitLab repo now can be archived to 'Read-only' mode. Please get in touch with me via Github. Happy coding and have a good time! How to migrate GitLab/Bitbucket to GitHub in a simple way was originally published in AndroidPub on Medium, where people are continuing the conversation by highlighting and responding to this story.