Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Push the code change from a sub tree to another repoistory

HI,

I have 4 repositories.

  1. Master
  2. Development
  3. Modules
  4. Includes

Master is my main repository that i want to create my final release builds from.

Development is all encrypted code

Modules and includes are subtree for the development repository. I would like to complete all the development part in my development repository and then push the code of modules and includes subtree to the master repository.

Thanks in advance

1 answer

1 accepted

0 votes
Answer accepted
Mikael Sandberg Community Leader Apr 08, 2020

Hi @Saad_ur_Rehman_Mohsin,

As I mentioned in my reply yesterday to your same question, it can be done, but you have to do the merge from the command line, it cannot be done within Bitbucket (and using subtrees do not change anything). Please see my answer from yesterday, https://community.atlassian.com/t5/Bitbucket-questions/Can-we-merge-the-code-to-another-repository/qaq-p/1343138

My merge problem is solved but the folder creation or directory structure gets messed up. How can I merge a subtree into a specific folder

Like I want to merge the subtree for includes in includes folder it is not doing that it copies it on the main folder that I don't want to do that. I have a folder structure

 

php/includes/

php/modules

 

 

I have two subtrees includes

modules/

 

my main problem is that in the include repository if I update everything in the include folder and create a subtree in my project it will create like this php/includes/includes and i want it to be php/includes. In order to do that I have to copy only the files in the includes repository. Now when I am merging the repositories it is copying the whole includes file at php that I dont want I want all the data to be merged in php/includes folder

Mikael Sandberg Community Leader May 21, 2020

Subtree doesn't allow you to have your source as a folder inside another repository, the source has to be a repository.

Example:

main_repository/some_folder/my_subtree

my_subtree

my_subtree is a separate repository that has been imported as a subtree in the main_repository.

This is a good source for how subtrees works, https://www.atlassian.com/git/tutorials/git-subtree

Suggest an answer

Log in or Sign up to answer
TAGS
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...

223 views 2 9
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