desktop: Default Branch does not Update
Description
Upon updating the default branch in my private GitHub repo, Desktop does not update. The old branch is still marked as default and used by default for new branches.
Version
- GitHub Desktop: 1.4.0
- Operating system: macOS High Sierra V 10.13.6
Steps to Reproduce
- Have a private GitHub repo with a default branch
dev - Create another branch named
develop - Change the settings of the branch such that
developis the default. - Go back to GitHub Desktop, restart, do whatever, and observe that the default branch remains
dev
Expected Behavior
On the next fetch or at least upon restarting the app, the default branch would update accordingly to develop
Actual Behavior
The default branch remains the previous default branch.
Additional Information
Logs
It happened one of these days based off history. I don’t see anything relating to default, but maybe they’ll be useful.
2018-09-13.desktop.production.log 2018-09-14.desktop.production.log
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 11
- Comments: 26 (6 by maintainers)
@Timawg Click the Current Repository dropdown in the top-left corner and select the already selected repo to reload it, which will re-sync the default branch.
if anyone still facing this problem:
git symbolic-ref refs/remotes/origin/HEAD@alburdette619 Thank you so much for reporting this and being so detailed in helping us to reproduce it! ❤️
I was able to reproduce this just now with a private repo and a public repo. Since we sort the default branch separately from the others and call it out specifically, I’m going to categorize this as a bug. But if I’m missing something, others feel free to weigh in.
@celloworld That did the trick, thank you!
Just updated one of my repos to switch the default branch. Desktop is still referencing the old default.
Looking at DevTools, when you fetch, it makes a call to
https://api.github.com/repos/*/*and the new default branch is returned correctly, but it seems to be ignored.I just removed the repo and re-cloned it and it fixed itself
Had the exact same issued.
Surprisingly all I had to do was to clone my repository on different path. After doing this, default branch was the intended (the one that is shown on github web), and also Branch->Update from “default branch”, option was working too.
Then removed the repo that had just created. On my old branch the default branch is the correct one and Branch->Update from “default branch” option was working there too .
I had the same issue. Fixed by deleting the GitHub Desktop folder from Application Support and the app from the Applications folders, re-downloading, and re-adding the local repositories on my M1 Mac.