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

How do I merge a subtree using Sourcetree?

Jeff Osia June 12, 2018

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

0 votes
Answer accepted
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 12, 2018
Jeff Osia June 12, 2018

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.

Jeff Osia June 12, 2018

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

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 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.

Jeff Osia June 12, 2018

Thank you very much.  I will check it out.

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 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.

Jeff Osia June 12, 2018

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
AUG Leaders

Atlassian Community Events