Desktop - cannot fetch from upstream

Hi there,

My class has been having issues with getting data from upstream via GitHub Desktop. When there are changes to origin, fetching says it is getting from upstream and when it is done there are no changes seen. But when we do it via commandline

git checkout master
git fetch upstream
git merge upstream/master

The changes show.

We have checked using git remote -v and we get this:

origin   https://blah.com/xxx/homework_submission.git (fetch)
origin  https://blah.com/xxx/homework_submission.git (push)
upstream   https://blah.com/yyy/homework_submission.git (fetch)
upstream   https://blah.com/yyy/homework_submission.git (push)

This is the first time I’ve encountered this issue, so I’m not sure what is wrong.
I am using Version 2.9.0 (arm64)

Can someone help?

These settings look correct.

Are you sure GH Desktop is not pulling instead of just fetching? (pulling implies fetching and merging, so you won’t see changes after that operation). Either that or GH Desktop is doing some smart operations behind the scene to synch your fork.

Hi tajmone,

You know the “fetch origin” button, when it is clicked the desktop doesn’t show that there are new “origins” from the upstream to pull.

We have tried doing a Repository → Pull. Also nothing seems to happen. It just seems that the Desktop doesn’t know to use the upstream to check.

I don’t use GH Desktop, so I’m not aware of the UI details, but you should be able to see the upstream remote too, not just origin. My Git GUI frontend (Sublime Merge) shows me a “remotes” side menu listing all remotes, and I can either fetch from just one of them or all of them, as I like.

Since remotes are part of your locally cloned repository settings, they should be automatically picked by GH Desktop, unless you have multiple clones of this same repository and the remotes are not set on the clone you’re using with GHD.

Nope sorry it doesn’t work and we still can’t solve it. Everyone has this issue. Not only me, and I’m not sure if it it is GHD issue.

@desmondga I replied to you in Desktop doesn't fetch from upstream · Issue #12731 · desktop/desktop · GitHub, but I just wanted to link that here for reference. The Pull origin button only pulls changes from the remote tracking branch to your local checked-out branch. Let me know if you have any further questions.

Interesting. So the problem was indeed related to the way GH Desktop abstracts away some Git operations by offering a simplified interface to end users. I only used GHDesktop for a short while, when it first came out (before it was re-vamped entirely), and I do remember that the idea was to provide an interface that didn’t simply map one-to-one with Git commands, but rather handles common operations as more abstract units.

I guess that’s a good approach for common GitHub related operations, especially for newbies who don’t get to handle all the nitty gritty behind those operations, but I guess it can also be confusing for those who are trying to learn Git command lines basic at the same time (that was my case, back then).

Thanks a lot Steve, it worked!

Desmond