The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How Do I Import A Repository From GitHub

Ken Tola
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 4, 2016

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

Thank you!

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Brian Jones
Community Champion
March 4, 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

 

0 votes
G__Sylvie_Davies__bit-booster_com_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 4, 2016

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>
     

TAGS
AUG Leaders

Atlassian Community Events