Search code examples
gitsmartgit

Git pull upstream branch not working


I already have an upstream, local, and origin remotes configured and both git and SmartGit have downloaded updates from upstream previously, however I am new to git and still often find it confusing. My origin is a fork of another developers github repo, and my local is a copy.

I know there have been some updates to the upstream branch on github both today and yesterday, but I couldn't seem to download these via SmartGit. However the following worked with git in cmd:

git fetch upstream
git checkout 1.0.8
git pull upstream 1.0.8

checkout 1.0.8 returned "already on 1.0.8" pull upstream 1.0.8 reported that it had updated 5 files from a 30th July update, but it didn't show any of the updates from yesterday or today; However when I checked the local files the more recent updates had been downloaded.

My questions are: 1) Shouldn't a git pull report on either all files updated or at least the total number of files updated? 2) How can I get SmartGit to do the same when only the Fetch button is enabled and the Pull button is disabled (the upstream is configured).

Any ideas please?

UPDATE: This is the Branches right mouse click menu: Branches right mouse click menu


Solution

  • With SmartGit, select your upstream remote in the Branches view, right-click and invoke Pull. Confirm the dialog with Fetch.

    Now SmartGit will update the remote branches of your upstream remote. As your local branches will most likely not be tracking the upstream remote branches, but your origin remote branches, a Pull won't work here (that's the same for Git command line). Instead, you should invoke Merge (or Rebase) and select the upstream branch you want to update from.