How do I refresh the remote branch list on Github Desktop?

9.6k Views Asked by At

Another programmer recently added a new branch and I would like to switch to it. But it doesnt appear in the remote branch list on Github Desktop. As per title I am looking for a "Refresh Remote Branches" button, to be able to refresh that list.

I was able to do it via command line with "git fetch --prune", but thats not the point. I would prefer not to jump around tools/windows just do perform this common function.

VS 2019 also missing this function. Seems weird both software lacking. You have to 'fetch' an existing branch in VS to do the same thing. Totally un-intuitive!

Since these functions appear to be missing from Desktop and VS 2019 (for years and years), how do developers work around this without ever having to refresh their remote branch list? Or is everyone just using command line or other workarounds?

3

There are 3 best solutions below

0
On BEST ANSWER

"Fetch origin" (at top right) should fetch the branches.

enter image description here

0
On

The thing to understand is that there is not really such a thing as asking the remote, directly, what branches it has. What you get to ask is what branches you have. They are of two kinds:

  • local These are branches that you make, that can be checked out directly into the working tree.

  • remote-tracking These are branches that correspond to what's on the remote, but they are copies held on your computer. pull, fetch, and push basically pass through them on their way from/to the Internet. To put it another way, they are what you synchronize with what's on the remote.

To synchronize from the remote to your remote-tracking branches, say fetch. Now you can just look right at your own remote-tracking branches. If you ask to check one out, a local branch corresponding to it will be created for you (if you don't already have one).

0
On

Sometimes you can't do a fetch if the branch you were working on is deleted, and you have some changes that you don't want to commit.

If you do a a Pull (CTRL+Shift+P), even if there are no changes to pull it refreshes the Branch List.