Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't checkout remote branch using GitHub Desktop

When I first clone a repo using GitHub Desktop (windows version), I'm able to see all of the branches and can checkout the branches.

However, if another contributor creates a new remote branch (after I've done the clone), GitHub Desktop isn't able to fetch and checkout the new branches. The branches are visible via the GitHub website. The only way I've found to checkout these branches via GitHub desktop is to delete the local repo and clone again. I was expecting the "Sync" button to handle fetching new branches from the remote repo.

Any ideas?

like image 259
angrycrab Avatar asked Oct 28 '15 14:10

angrycrab


People also ask

How do you checkout on GitHub desktop?

To do git checkout mybranch on Github Desktop, you simply click on the dropdown menu on the upper left hand corner of the client, and pick the branch you want to switch to. It manages files exactly like git does, so all files are stored in their respective branches.

Can I checkout remote branch git?

Git checkout remote branch is a way for a programmer to access the work of a colleague or collaborator for the purpose of review and collaboration. There is no actual command called “git checkout remote branch.” It's just a way of referring to the action of checking out a remote branch.


2 Answers

According to Steve Ward at GitHub Support:

You should be able to hit F5 in GitHub Desktop to refresh the repository and fetch any new branches from the remote repository. There currently aren't any animations for this process, but it should work without issue. [...] we automatically fetch new branches every five minutes as well.

like image 100
Guillaume CR Avatar answered Sep 23 '22 15:09

Guillaume CR


You can also click on the "Gear" button in upper right of the client, select "Open in Git Shell" and type the command git fetch in the command window that is opened...

like image 30
Quintus Marais Avatar answered Sep 22 '22 15:09

Quintus Marais