Sourcetree crashes when checking out remote branch.
Asked by Spencer Kolbus:

Two things happen when I try to check out a remote branch from my bitbucket repository.

1. Sourcetree cannot see the local repo for this remote repo and asks me to create a new one.
2. If it was able to see local repo for this remote repo, when it goes to checkout the branch it crashes immediately.

Also there is a red "!" symbol by the remote icon in Sourcetree, and when I go in and edit the settings of the repo that goes away. However I am still unable to checkout remote branches and it crashes when I try.

I can fetch, pull, and push to the repo and am getting updates when I need to pull even though I can't checkout a remote branch. I can create a new local on and push it to Bitbucket, but any new remote branches I cannot checkout.

The only way I was able to checkout a remote branch was to either use the git command line, or uninstalling Sourcetree and installing version 3.2.6.3544 of Sourcetree from the website. Once installed I get a notifiation to update to the most current version and if I do that I am unable to checkout remote branches.

So I am unable to update Sourcetree cause it will break my remote repo. Has anyone else had this problem?


Answers:
author: alexjdg
body: I'm having the exact same issue on versions newer than 3.2.6, up to 3.3.9 (latest).


author: ceasar stevens
body: No answer here yet. But I have version 3.0.17 and I have had this for over 6 months no issues until now. When I try to create a branch from bitbucket and open it in SourceTree it crashes.

The remote icon does have a red warning icon but that has been there a while, so I don't think it's the settings.

comments: author: ceasar stevens
body: So maybe this will help someone. This is what worked for me. I recently updated my Newtork password however it did not update my password stored for Bitbucket I guess. So, I went to Windows Search box and typed Credential Manager. I opened Credential Manager and selected Windows Credentials and scrolled down to my repository path name and clicked the arrow to open the credentials and then clicked edit and updated my password. Logged out of bitbucket and logged back in (with the Captcha) and was able to check out the branch I needed from Bitbucket.


author: phil.kenderdine@incontrol.com
body: I have been having this problem for sometime. It used to be a nice feature but now I always copy the git command and use git to fetch and check out the branch. I did try to revert to an earlier version but the problem still remained. I will try to 3.2.6 version and see how we go.


author: fergiektid
body: Same issue here with 3.3.9.

Event viewer shows pretty much an identical error to that explained here :  
<https://community.atlassian.com/t5/Sourcetree-questions/SourceTree-keeps-crashing-checking-out-a-BitBucket-branch/qaq-p/1435058>  

Reverted to 3.2.6 and all is well.


author: Rob Richardson
body: I've had this same issue with 3.3.9. Rolled back to 3.2.6 which seems to work

comments: author: Steve Plant
body: For info: I have stayed with 3.2.6, which is working OK for me (fingers crossed), for that same reason.


author: Steve Plant
body: Isn't it disappointing how an error like this can persist, seemingly without any action from Altlassian? At least there is hope on our side - moving to GitHub soon, which means goodbye to SourceTree.


author: mprodan2
body: are there any updates on this?

Same issue on 3.3.8. Did not have this issue on my previous version, but frankly i am not sure which one was it :)


author: HiSte
body: Same Issue here.  
Even in 3.3.8.


author: Bluestone69
body: I am getting exactly the same issue with 3.3.4.


author: anders_melander
body: I've had these problem too since upgrading to 3.3.4

I have the "!" symbol too and have to edit the settings before I can checkout. The setting changes aren't persisted so I have to do it every time I start SourceTree - crash or no crash.  
I *can* check out by branching the "remotes" tree and selecting "checkout", but if I use Respository-\>Checkout or if I "Check out in SourceTree" via Stash I get the crash immediately.


author: Steve Plant
body: I have had the same issue with 3.3.4 today.