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

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 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
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

7,263 views 5 14
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