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

What is easiest way to move entire repository to Bitbucket

Brian Vrolyk Nov 20, 2015

We are currently using TFS for Git and I am tasked with moving that over to Bitbucket this weekend.

The current remote repository contains many branches. What is the easiest way to migrate the entire repository? My current (lengthy and tedious) plan of attack is:

  1. Checkout every branch individually.
  2. Pull every branch individually.
  3. git remote add origin git@bitbucket.org:....
  4. git push -u origin --all
  5. git push -u origin --tags

My big concern is with steps 1 & 2. With so many branches, and depending on my internet connection, just those steps could take me nearly all weekend. And even if it didn't, the tedium of repeating nearly the same command for every. single. branch. may well drive me insane.

 

 

 

1 answer

1 accepted

1 vote
Answer accepted
Brian Vrolyk Nov 21, 2015

Atlassian Support was very helpful and provided me with this link:

https://designhammer.com/blog/easily-migrate-git-repositories-bitbucket

 

Specifically, the commands I was looking for were:

git clone --bare

and

git push --mirror

But the link contains much more useful information for anyone attempting this sort of migration.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

1,975 views 1 19
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