I'm running Git Extensions 2.32 on Git For Windows (previously known as msysgit) 1.7.10.msysgit.1.
Another user has created a new branch and pushed it to the remote repository. I want to fetch that new branch down to my local repository.
This image shows what I'm trying to do. The master is currently checked out and the other user has added a new branch, "brentfo", which he has pushed up the remote repository. I want to now fetch that new branch down to my local repository.
I open the Git Extensions Pull dialog, as seen in the image. I'm pulling from the origin with merge option "Do not merge, only fetch remote changes", selecting the new Remote branch "brentfo". When I click on the Pull button I get a progress dialog:
c:\Program Files (x86)\Git\bin\git.exe fetch --progress "origin" +refs/heads/brentfo
Done
From //dnzchfile1/git-chch$/mRouteDotNET
* branch brentfo -> FETCH_HEAD
The progress dialog does not show any error. It appears the process completes normally.
The FETCH_HEAD file shows the following:
eea033921fea43acf34a5baa380d1666181b56aa branch 'master' of //server/gitrepo/mRouteDotNET
5e0640e42d04a744aae2e95663a13c0747cacaf1 not-for-merge branch 'brentfo' of //server/gitrepo/mRouteDotNET
934e6034c526b703ac69b26497e0131f9bb71c2c not-for-merge branch 'mRoutePCLib' of //server/gitrepo/mRouteDotNET
When I look at the commit log afterwards, however, nothing seems to have happened (the commit log appears in the background in the image of the Pull dialog, above). The new branch, brentfo, has not been created in my local repository. When I pull down the dropdown list of branches there are still only two: master and mRoutePCLib.
I get the same result if, in the Pull dialog, I don't select any Remote branch (ie leave it blank). In that case the progress dialog shows:
c:\Program Files (x86)\Git\bin\git.exe fetch --progress "origin"
Done
There appears to have once been a bug to do with creating local branches from remote ones in earlier versions of Git Extensions. However, looking at the Git Extensions project change log the problem looks like it was solved way back in version 1.55. So I'm guessing I'm doing something wrong.
I know I can use the Git Bash console to fetch the remote branch and create a new local one from it. However, it seems to be I should be able to do this via the GUI.
I'm hoping for answers along the lines of either:
a) Yes, you're doing it wrong and here's how you should do it (via the GUI); or
b) This is a known issue, you'll have to do it from the command-line interface (Git Bash) until the bug is fixed.
Cheers Simon
Fetching will just bring in all the changes in the current branch (and locally tracked branches? someone help me on this one.) and the knowledge of all the remote branches. You really don't want fetch to bring down all the commits for all the branches that you haven't checked out yet.. That would be bad if there were thousands of branches. For checking out remote branches that you can't see yet, you Fetch then Checkout Branch.
You already fetched the existence of the remote branch.
Now you want to do
Git Extensions -> Checkout Branch
Change it from Local to Remote. Pick the remote branch in the drop down. Say ok, it will ask if you want to create a local branch then track it. Make sure to click Yes.
I recommend finding some way to buy Smart Git 3. It is by far better than all the other Windows Git products. They have a free Open Source license version.