how can I utilizes read-tree respecivele git subtree in sourcetree

I have a library which applies to several projects. I started using submodule but I wanted others to simply checkout the project and get everything they want.

I played around with the following sequence on the command line according to

It initially worked but I honestly did not really understand what I was doing. Later it happend that one of the consuming projects was pushed entirely to the library - which is definitely not intended.

Is there a fool - proof way to use read-tree or even git subtree with sourcetree.

Thanks in advance and thanks for sourcetree.

1 answer

1 accepted

0 votes
Answer accepted

SourceTree doesn't support subtree yet, only submodules. Subtree was an experimental replacement for submodules and isn't used very widely yet AFAIK.

git subtree is a convenience script around git read-tree. git read-tree on the other hand is long available in git.

git subtree is now part of the official git sources (still in contrib).

However it is, all these things are somehow difficult to handle and a support in sourctree would be ammazing.

I currently start to create scripts in my project to handle these things. A part of help would be, if I could invoke these scripts from within sourcetree.

You can invoke any outside script from inside SourceTree using Custom Actions - please see Preferences > Custom Actions and this blog post for details:

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 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...

1,228 views 4 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you