I didn't see any options to do this in the pull window. What should I do?
-
When you fetch your local repo should have all commits record. What exactly do you want to do? – orb Sep 15 '15 at 04:10
-
2@orb I want to clear the number at the right side of my local branches. I am an OCD patient. :( Trying to accommodate git – Harrison Xi Sep 15 '15 at 09:00
-
1You can actually make sourcetree to stop tracking remote branch, in that way the numbers will disappear. Right click on the local branches to do that. – orb Sep 17 '15 at 02:03
-
1@orb I came here looking for a solution to "how do I get all tracking branches up to date before I go offline for a period". This request is more than just an OCD desire not to have numbers in the left pane. – GreenAsJade Jul 09 '16 at 02:53
-
1@GreenAsJade I guess what you are looking for is "Fetch from Remote" by right clicking the remote that you want your branches to be updated with. If you are tracking multiple remotes then you will need to fetch them one by one – orb Jul 10 '16 at 11:09
-
The only solution I could find was to right click on the branch with a "number" and select `fetch`. – Abhi Beckert Aug 01 '17 at 01:00
4 Answers
When the repository is cloned, you will see all of the remote branches under "Remotes" in the Sidebar.
If any content is missing, you can click Fetch to fetch all objects necessary to complete the history for all branches and tags in the remote repository.
If you can see it in SourceTree, it's stored on your computer. If you want to check out one of the branches, double click it. You can switch to any of the branches whenever you want without an Internet connection.
There is no way to — and no need to — "pull all branches".

- 65,323
- 19
- 161
- 287
-
4He said he wanted to pull all branches to remove the notification numbers next to each branch. – BillyTom Nov 17 '15 at 07:39
-
28"There is no need to pull all branches". This is not a true statement, and assumes you can anticipate all needs. I want to pull all branches so that I can go offline and switch between heads of all branches at my leisure while offline (on the plane for example). – GreenAsJade Jul 09 '16 at 02:51
-
2@GreenAsJade You *can't* explicitly "pull all branches". `git pull` just runs `git fetch` and then `git merge`. And `git fetch` fetches all objects necessary to complete the history for all branches and tags in the remote repository. What you are saying you want happens by default. – Aaron Brager Jul 09 '16 at 05:21
-
6@AaronBrager This question is about SourceTree - a GUI client for git. You are describing what the underlying tool does. It doesn't match my experience of what SourceTree does. Specifically, if I "Fetch" a remote using SourceTree (by pressing the "Fetch" button) , then try to go to the head of a different branch from that remote while offline, I am not able to do so. I have to "Pull" (SourceTree pull) each branch before I go offline. Hence the question: how can this be done for all branches (other than individually). – GreenAsJade Jul 11 '16 at 01:51
-
@GreenAsJade I can't replicate this in SourceTree. Once I press the "Fetch" button and then go offline, I am able to check out any commit, even those not referenced in a local branch. – Aaron Brager Jul 11 '16 at 02:25
-
1For remote branches for which you have a local tracking branch, try clicking Merge -> Merge Fetched -> OK to merge the new remote changes into your local branch. After fetching, that works for me, online or offline. – Aaron Brager Jul 11 '16 at 02:25
-
If your question is about how to perform that "merge" operation automatically on all branches inside of SourceTree, I do not think there is a way to do so. You could [file an enhancement request](https://jira.atlassian.com/projects/SRCTREE/issues) or write a script to iterate each branch, or just do what most people do: merge them as needed when you begin work on them. – Aaron Brager Jul 11 '16 at 02:30
-
Thanks for taking the trouble Aaron, much appreciated. I will try to isolate what the sequence is that I do that's different to what you described. What you described is what I was looking for :) – GreenAsJade Jul 12 '16 at 03:14
-
-
(Note: I think your statement "there is no need and no way to pull all branches" is not true for the OP (and my) definition of "pull all branches". In fact, "Fetch" does what we were looking for, combined with the knowledge that you need to Merge Fetched" after.) – GreenAsJade Jul 19 '16 at 08:21
I would like to expand on the other answers.
With git, first you have to checkout the remote branches that you are interested in, so that they are local. So in SourceTree you right click on each remote branch and click checkout.
Once the branches in which you are interested are local, you can now use git-up.
How to install git-up so it is easy to use in SourceTree
For me on OSX 10.11.1 (El Capitan) it was as simple as sudo gem install git-up
in Terminal, but YMMV. (Make sure the git-up executable it installs is in your path. For me it was installed to /usr/local/bin
which was already in my path. Google if you need help with that. Here is a Stack Overflow link that might help.)
Now create a custom action in SourceTree. Go to SourceTree preferences -> Custom Actions and click add. Fill out as follows:
- Menu Caption:
git-up
- Script to run:
git-up
- Show Full Output: checked (my personal preference, unchecked is also ok)
- Parameters: leave blank
- Click "click to record shortcut" and assign a keyboard shortcut. (I use
CMD + U
.)
Now whenever you are in SourceTree use your keyboard shorcut to pull/rebase all of your checked out branches. This prevents you from having to switch to each branch to pull/rebase each branch.
Note: if you don't want to rebase you can tweak exactly what git-up does. See git-up's github page.
Connect SourceTree to master (clone)
Then with shell navigate to project folder and run such:
git branch -r
(will show all remote branches)
git checkout --track origin/[branch name]
repeat checkout for all branches - SourceTree will get them almost immediately

- 4,209
- 2
- 17
- 21