importing source code and history from another server

Hello,

We have a project that's under source control. The repository is a Bonobo server. We would like to transfer the source code along with the entire history over to BitBucket. We can get to the point where we are logged into our BitBucket account and we can create a new project. Now we would like to know: how do we import the project sitting on the Bonobo server along with its history over to our new BitBucket project?

Is there a step by step guide that we can follow?

We can also work in SourceTree if importing from the Bonobo server can be done from there.

2 answers

1 vote

Hi @Gibran Shah,

As of Bitbucket Server 4.9 you can also import repositories using the web interface with our new Repository Importer

The git repositories are easily moved - you should be able to find a complete write-up.  We have an automation tool that does this.  What it essentially does when migrating repos from git to git is:

 

git clone --mirror src-repo-spec

git remote add target  target-spec

git push --all target

git push --tags target

 

 

 

 

Thanks Rich,

I get stuck on step #2: git remote add target target-spec:

add to target fails.png

For target-spec, I enter "https://gibran_shah@bitbucket.org/acmriskalive/risk-aliveprodiler-2.git" because that's what the Bitbucket instruction page tells me to do:

bitbucket instructions.png

... except it says to use "origin" instead of "target".

Unfortunately, I get an error: "fatal: Not a git repository (or any of the parent directories): .git".

Once you clone the repo, it will create a directory in the current directory.  You need to cd into that directory before doing the git remote add target

 

-Rich

Thanks Rich,

Once I got that, the rest worked like a charm.

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 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

24,354 views 26 12
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