Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Migrating GitHub to Bitbucket Server, forked repos Edited


I am working on moving many repositories from our GitHub instances to Bitbucket Server.

We have a main organization that our other orgs fork from in GitHub. I am moving all of these repositories over, but need to keep this forked relationship between the repos. Is this a possibility?

Bitucket Server: v4.13.0


1 answer

1 accepted

1 vote
Answer accepted

Found a manual solution. Adding it here in case anyone ever runs into this. This method can work from any Git source, not just GitHub to Bitbucket.

  1. Clone the main repo from GitHub using --bare. (git clone --bare [repoURL])
  2. Clone the forked repo from GitHub using --bare. (git clone --bare [repoforkURL])
  3. Create a new repo in Bitbucket for the main repo.
  4. Clone the new repo from Bitbucket.
  5. Commit and Push a dummy file to the main repo in Bitbucket (I chose to use do a readme file)
  6. In Bitbucket, fork the main repo to whichever project you want the fork to exist.
  7. Add a remote for the Bitbucket main repo to the bare repo from Step 1. (git remote add [repoURL])
  8. Push all the repo data to the Bitbucket main repo. (git push --all bitbucket) (git push --tags bitbucket)
  9. Add a remote for the Bitbucket forked repo to the bare repo from Step 2. (git remote add [repoURL])
  10. Push all the repo data to the Bitbucket forked repo. (git push --all bitbucket) (git push --tags bitbucket)

Note: You may see some conflicts when pushing to the repos. Use --force to overwrite the dummy file added in Step 5.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in DevOps

Step up your DevOps game webinar Q&A series - Questions answered!

  On October 21st, 2020 we hosted a webinar titled,   Step Up You DevOps Game with 4 Key Integrations for Jira and Bitbucket. We had a great showing and high engagement, but that meant th...

111 views 0 1
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you