Reputation: 16287
I am running SourceTree 1.6.11 on windows. I have cloned a Git repository but it does not show my remote branches:
Does SourceTree only show local branches?
It shows all the tags though.
Upvotes: 34
Views: 85208
Reputation: 316
If none of these command line options work for you (like they didn't for me), then you need to tick the "Show Remote Branches" box above the graph:
This made it work for me.
Upvotes: 0
Reputation: 289
My issue was I didn't see the little checkbox "Show Remote Branches" in top bar in SourceTree :-)
Upvotes: 0
Reputation: 1152
I have tried different things like upgraded the source tree, restart , clear cache and all other things. does not work for me. However Following step solved my problem. It is look like source tree bug which is already reported multiple times.
Upvotes: 0
Reputation: 9872
I had the same issue .refresh didn't work.so i manually fetch from the remote
Just run this command and restart sourcetree
git fetch --all
Upvotes: 7
Reputation: 888
This is an old post but I thought as I got here, others may too I had this issue in 1.6.2 Source tree (in Oct 2015) and my new remote made on another machine 5 days ago was not showing up in Source Tree on my work machine. I can see my remote branch with command line and in BitBucket web site but not in SourceTree.
Anyway, after ten minutes of doing nothing my remote branch showed up.
I then found in options that there is a setting for refreshing remotes which not surprisingly was set to 10 minute intervals.
On top of this it is possible to refresh immediately with ALT+SHIFT+R
Hope this helps someone.
Dave
Upvotes: 12
Reputation: 253
I ran into this and none of the solutions here worked for me. What did work was in my SourceTree repository, press the Settings button to get the Repository Settings dialog. Then press the Edit Config File button and open the config file. Then changed the fetch line under [remote "origin"] to this, saved the file, fetched and the remote branches then showed up. Before:
fetch = +refs/heads/master:refs/remotes/origin/master
After:
fetch = +refs/heads/*:refs/remotes/origin/*
Upvotes: 16
Reputation: 11
I tried a few of the above examples with no luck so here is what I did. In BitBucket, go to the branch you want to check out and press the beautiful blue "Checkout in SourceTree" button.
Next I went to SourceTree and instead of clicking Branches, which one would think being a newbie, click remotes on the left side. Open up your tree views until you find the branch you want to access and double click. A dialog should pop up to create a new branch, Go ahead and press ok. Your BitBucket branch should now be in your local and be showing in the Branch side menu.
If this is completely wrong or the incredibly slow way let me know but it worked when all else didn't.
Upvotes: 0
Reputation: 11
I had this issue and it turns out the repo I was attempting to push to was not assigned to the team I was given rights to work as a part of. My admin moved the repo to our team and the problem was fixed.
Upvotes: 0
Reputation: 601
I found this to checkout a remote branch:
Repository > Checkout > Checkout New Branch > Checkout remote branch [select remote branch to checkout]
The branch I selected is now shown in the menu on the left under branches, (although still not in the branches dropdown box along the top)
Hope this helps.
Upvotes: 43
Reputation: 5032
(This probably is not your issue but it is easy to end up here with certain search queries.)
Make sure you perform a fetch
on the remote repo. This may take care of it.
Upvotes: 1
Reputation: 5860
The solution for me was simple. Simply use the command line, and execute
git branch -r
and
git branch -a
to make sure you have all the remote branches locally, then checkout each branch which is NOT showing in sourcetree. After you check it out, it will display in sourcetree.
For instance, after executing
git checkout develop
your develop branch will display in sourcetree.
Upvotes: 8
Reputation: 2733
What wound up working for me, after some trial and error, was to:
The Fetch alone didn't seem to do the trick, in and of itself, for each repository I experienced the issue in (it happened in a small handful, and a Fetch alone did work for some).
Expanded info:
What seems to be at issue here is how the local repository was tracking the remote. For those that a simple Fetch did not resolve the issue, running git branch -r
in the repository yielded nothing. After successfully being able to view them, I confirmed the output of git branch -r
output the HEAD along with master and develop branches for my remote, as I expected.
Upvotes: 7
Reputation: 39678
SourceTree does show remote branches. It seems like your remote repository only has a branch master
. Compare the output of git branch -r
, which lists all remote branches. Try git fetch
if your remote copy is out of sync.
Upvotes: 3