How Do I Import A Repository From GitHub

Is there something built into Bitbucket or a process I can follow?

Thank you!

2 answers

1 accepted

1 vote
Brian Jones Community Champion Mar 04, 2016

If you are on Bitbucket Cloud here is a pretty good article on how to do it.

http://befused.com/git/github-bitbucket-move

 

If you are on Bitbucket server its a little more complicated. What seems to work best for us, when we migrated from GitHub Enterprise to Bitbucket Server is the following:

  1. git clone --bare <git url>
  2. cd into your cloned repo
  3. git remote add <new repo name> <new repo URL>
  4. git push --all <new repo name>
  5. git push --tag <new repo name>

 

Hope that helps.

-Brian

 

This usually works for me (Bitbucket Cloud and Bitbucket Server).  Slightly fewer steps compared to Brian Jones's answer:

  1. Creat the repo in Bitbucket Cloud or Bitbucket Server as a new repo.
  2. git clone --mirror <github clone url>
  3. cd into the cloned repo dir
  4. git push --mirror <bitbucket clone url>
     

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 06, 2018 in Bitbucket

Do you use Bitbucket Cloud and Jira Cloud? If so, let us know!

Hi Community, I'm Julia and I'm on the Jira Software Cloud marketing team!  We're looking for companies or teams using Bitbucket Cloud and Jira Software Cloud. If your team fits the t...

129 views 6 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you