I have a number of repositories. How do I merge them locally into one large repository?

A Bitbucket user asked us the following question. As I had recently challenged a similar issue, I wanted to publish my results:

Hi Team,

I have five repository in my bitbucket account and I want to move all the
content from all 5 repository to one new.

Steps That I followed:

1. Clone all the repository on my local system.
2. Created new repository and clone that empty repository on my local
system.
3. Copy and Past all the five repository into newly created repository on
local system.
4. git push the newly created repository

I am observing issue that only folders pushed to bitbucket but data not
pushed.

Please suggest the correct way for this task.

Thanks,
Megha

1 answer

1 accepted

It seems like what is happening here is that Git is identifying the sub-folders of the main project folder that contain .git folders as a subtree.

To prevent this behavior, strip out the .git folders from each subfolder in the project.

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
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

413 views 0 1
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