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

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

Create a subtree without creating a new folder


I  have two repositories.

1. dev repo

2. Subtree repo

For subtree folder I have a folder include in which all code is present but I cannot put that code directly in the folder as I have to create a subtree and when i create a subtree it creates to include folders.

The subtree repo has a folder named as include and it has multiple files and folder structure. Now when I am trying to add that subtree in the main repo it creates a new folder named as include and my directory structure gets messed up. Because it creates like this dev_repo/include/include though I need dev_repo/include


The main problem is that I have to merge this subtree repo back to the main repository from where I make my builds. While I am merging to the main development folder the merge command  is keeping the directory structure as it is in the merge


git remote add -f include
git merge include/master --allow-unrelated-histories


This command is not creating a subfolder that I need for include so my main folder has directory structure like main_dev/include/


Can anyone help me on this issue.

Either I can create a subfolder in merge command or in subtree I dont mess with the directory structures.


Thanks in advance

0 answers

Suggest an answer

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

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,711 views 10 16
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