Github Desktop won't update Default Branch to main
See original GitHub issueDescribe the bug
In the repository and from the command and in every conceivable place I have updated my default to main. However, when I click on the dropdown from Github Desktop it still displays master as the Default branch.
NOTES:
- I have gone through every previous related issue and followed steps to solve to no avail.
- This command: git symbolic-ref refs/remotes/origin/HEAD | sed ‘s@^refs/remotes/origin/@@’ returns: main
- master branch has been deleted
Version & OS
Github Desktop Version 2.9.6 (x64) macOS Monterey Version 12.0.1
Steps to reproduce the behavior
- Change default to main in the repository and delete master
- In every conceivable place change default branch to main
- Rub these steps:
git branch -m master main git fetch origin git branch -u origin/main main git remote set-head origin -a git branch -d -r origin/master
- Confirm default is main using command line and checking repository and user settings
- Restart computer and/or git
- Notice that default in the dropdown still lists master
Expected behavior
Default should not point to a branch that doesn’t exist. It should match whatever the remote repository points to.
Actual behavior
It is not updating
Screenshots
The interface here won’t allow me to upload a screenshot.
Logs
Not sure if I can share these as this is work related
Additional context
Add any other context about the problem here.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
GitHub Desktop show the wrong default branch · Issue #11299
Go to the remote repo and verify that master is set as the default. · Open GitHub Desktop and switch to the local...
Read more >Default Branch does not Update · Issue #5709 · desktop/desktop
Have a private GitHub repo with a default branch dev · Create another branch named develop · Change the settings of the branch...
Read more >Default branch not changing · Issue #14844 · desktop ... - GitHub
Here we set develop as our default Branch, but github desktop isn't updating it in the application and still shows main as our...
Read more >Changing the default branch - GitHub Docs
Under your repository name, click Settings. ... Under "Default branch", to the right of the default branch name, click . ... Use the...
Read more >GitHub Desktop still defaults to creating a default branch titled ...
Once it is created, go to GitHub Desktop and File>Clone repository... ... Current branch is now set to master. You cannot rename master...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@steveward did you mean #14266 ? I’ve just clicked through to this same page more times than I’d care to admin. 😂
Thanks for the report @john-lebens-highspot. I tested this out a bit and it does seem that GitHub Desktop isn’t updating the default branch correctly. We’ve had reports of this in https://github.com/desktop/desktop/issues/11299 as well. I’ll label this a bug for us to look into.
For reference a fresh clone of the repository should resolve things.