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

How do I merge a subtree using Sourcetree?

I am new to GIT and I am trying to do what I was doing in SVN with externals.  Any help is appreciated.

1 answer

1 accepted

Thank You.  I still cannot find what I am looking for.  Maybe subtree is not the right solution for the problem.  I am trying to share a project between 2 .NET solutions.  When I change code in 1, I want the code to change automatically in the other.

Is the command line the only option for merging subtrees using Sourcetree?

Mikael Sandberg Community Leader Jun 12, 2018

Git subtree will not change the code automatically, it creates a copy of the subtree so you can make changes to it and then push it back to the subtree if you want to share your changes.

The closest to automatically update the code between two solutions would be symlinks. Check out https://github.com/git-for-windows/git/wiki/Symbolic-Links#creating-symbolic-links. You would still have to push/pull manually to make sure your repositories are up-to-date.

Thank you very much.  I will check it out.

Mikael Sandberg Community Leader Jun 12, 2018

You can merge subtrees from within Sourcetree too, it does not have to be done from the command line. It has been a while since I used it, but I did notice that when you upgrade Sourcetree it used to loose the connections to the subtree repositories so you would have to manually add them back, not sure if this has been fixed yet.

I noticed that today.   My subtree was not there when I pulled up sourcetree.  I will  try upgrading.  Thank You.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,895 views 0 12
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