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 votes
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 Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

631 views 0 4
Read article

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot