subtree pull hangs or pulls into the wrong folder

I just asked this question before but it seems to have disappeared.

Anyway, having some issues with the new subtree functionality in Windows SourceTree v1.5.1.0. Using embedded Git 1.8.3.

I actually have a couple of problems;

* If I set up a subtree link directly to a bitbucket repo, subtree pulls just hang, with the progress bar spinning along until I hit cancel. As far as I can tell, account is correct since I can pull to a normal repository, it just fails when pulling to a subtree. If its related, when I create the link to bitbucket, it initially tries to use an email address instead of an account. I had to change this because email at address at bitbucket cannot be resolved.

* To get around my first issue, I've cloned a repository locally, and I'm linking a subtree from that. when I pull from that, I get the files, but they're all pulled into the wrong folder. They end up in the root of the main repo instead of in the local relative path as specified in the subtree configuration. If its related, a pull from the subtree with squash commit check always fails with

"Can't squash-merge: 'Common\Library' was never added."

I dont understand what that is about, the repo definately has files in it.

With regards to my configuration;

* The shared code repository is located completely outside of the main project repo.

* The source path of my subtree link is set to the root of the common code repo.

* Local Relative path is set a couple of folders into the main repository.

Does anyone have any ideas why a subtree pull always drops files in the root of the repository instead of the local relative path, and why pulling from bitbucket directly keeps hanging?

Thanks and regards,


2 answers

1 accepted

0 votes
Accepted answer

Still unresolved. Moved to JIRA SRCTREEWIN.

Hey Luc,

Could you use JIRA for this? I only happened to spot this sifting through e-mail - the developers don't use Answers, we'll see it direct if you post, with details, through JIRA.


Yeah, I had. Just commented because I got a request to mark the question as answered. Thought I had done that but obviously not. Done now.

Hey Luc,

I'm the guy who developed subtree integration on SourceTree.

subtree pulls just hang, with the progress bar spinning along until I hit cancel

Could you check and see if there's anything in there from SourceTree? It's not unknown for pulls to just hang, and you've got the command output window there so if it was having an issue that would tell you. The subtree extension would report anything to you that you need to know so it could be something we're doing wrong.

More importantly here, what is the local relative path you're setting? It could be a path that Git doesn't like. Also is the main repository a Git repo?


Hmm.. Further issues. Whenever I close and reopen SourceTree, my subtrees disapear and I have to recreate them ><.

I'm using Windows btw, not the Mac version. I assume thats what you meant when you said

Anway, I've found the source tree log after googling that ;)

This is the error I'm getting:

2014-04-10T10:17:28: Could not determine repository from: '', output was:

fatal: unable to access '': Could not resolve host:

Looks like a bug, its using the wrong connection details. I specified the Source Path / URL in the subtree dialog as


Regarding Git (sourcetree?) dumping files in the wrong folder; I'm running SourceTree in a virtual machine, for whatever reason its completely unusable on the actual machine itself. Takes 15 minutes to open, 10+ minutes to commit.

Regardless it may be related to

2014-04-10T10:17:59: Failed to copy repo config for E:\Visual Studio\biotools: System.UnauthorizedAccessException: Access to the path 'E:\Visual Studio\biotools\.git\sourcetreeconfig' is denied.

I'm going to connect the virtual machine to the domain and use my proper domain account to see if those UnauthorizedAccess exceptions go away.
Will get back to you.
Thanks for your help.

Well, resolved my subtree issue where they were disappearing after I closed and reopened sourcetree. Went into .git folder at the root of the repository and the deleted everything inside the subtree-cache folder.

May be related to the sheer amount of files in there - I created and deleted a lot of subtrees trying to get this to work. Was 386 files at the time.

After changing user accounts I had to set sourcetree up again. Changed account details to my account name instead of email address. I'm not getting the failed to resolve issue anymore, but pulling the subtree from bitbucket is still hanging.

I also changed to UNC paths instead of using a mapped drive.

I'm not getting any new error messages in sourcetree.log, and this is the only thing that appears in the output window:

git -c diff.mnemonicprefix=false -c core.quotepath=false subtree pull -P Common\Library

No further output occurs.

I can still pull from a local repo, but again as before all files are dropped in the root of the main repo instead of the local relative path.

Shared code repo is at

\\DISCOMBOBULATOR\Repository\Visual Studio\Common\TAA Interfaces

Main repo is at

\\DISCOMBOBULATOR\Repository\Visual Studio\biotools

Initial setup for Local Relative path when defining the subtree is

\\DISCOMBOBULATOR\Repository\Visual Studio\biotools\Common\TAA Interfaces

When when viewed after saved is recorded as

Common\TAA Interfaces.

Thanks again,


Hey Luc,

Could you open a SRCTREEWIN ticket on jira.atlassian.comand just summarise what we know? Us developers don't usually collaborate on Answers so I miss posts on here often. I might miss future ones otherwise.


It is worth pointing out that Git in general often chokes on psuedo-local repositories. Instead of sharing repositories via network storage, it is more reliable to clone them to actual local storage.

Could you open a SRCTREEWIN ticket on jira.atlassian.comand just summarise what we know?

Sure. I've split them up

SRCTREEWIN-1619 - Not honoring subtree dialog path.

SRCTREEWIN-1620 - Disappearing subtrees in GUI after restarting.

SRCTREEWIN-1621 - Files being dropped in the wrong location

I can continue working with it for now, though with some extra steps / workarounds ;)

Thanks for your help.

Seth, just to further explain, I have a colleague who is experiencing the same issue - that is pulling from a subtree connected directly to bitbucket hangs.

He is pulling from bitbucket to local storage, so it cant be that.

I don't see the part about SourceTree hanging on subtree pull in the JIRA issues. I found someone else's issue about it thouogh, here:
but there's no resolution yet.

For me, even adding a subtree from SourceTree (Win) hangs with the commands

git -c diff.mnemonicprefix=false -c core.quotepath=false subtree add -P subtree2 --squash

git fetch

and nothing on sourcetree.log


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,123 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