Atlassian SourceTree does not show remote branches?
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.
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.
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.
What wound up working for me, after some trial and error, was to:
- copy the path of my remote
- remove the remote from my repo settings
- let my project refresh in SourceTree
- add the remote back, in repo settings
- perform a Fetch
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).
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.
The solution for me was simple. Simply use the command line, and execute
git branch -r
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.
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.
(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.
- Database Administration Tutorials
- Programming Tutorials & IT News
- Linux & DevOps World
- Ebook Reviews
- PES Matches, Skills & News