question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Default Branch does not Update

See original GitHub issue

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

  1. Have a private GitHub repo with a default branch dev
  2. Create another branch named develop
  3. Change the settings of the branch such that develop is the default.
  4. 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

screen shot 2018-09-21 at 3 40 05 pm screen shot 2018-09-21 at 3 40 15 pm

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:11
  • Comments:26 (6 by maintainers)

github_iconTop GitHub Comments

37reactions
cd88commented, Aug 23, 2019

@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. Screen Shot 2019-08-23 at 12 24 53 PM

6reactions
RaddadZcommented, Feb 18, 2022

if anyone still facing this problem:

  • try running this command in your repo folder: git symbolic-ref refs/remotes/origin/HEAD image
  • if you get the old default branch name, then go to <your repo folder>/.git/refs/remotes/origin/HEAD and change its value to your real default branch image
  • restart Github Desktop, that’s it! it should recognize the real default branch in creating, rebase, and everywhere else. image
Read more comments on GitHub >

github_iconTop Results From Across the Web

Github Desktop won't update Default Branch to main #13669
Change default to main in the repository and delete master · In every conceivable place change default branch to main · Rub these...
Read more >
Renaming the default branch - Tidyverse
If you don't want to use usethis, you can rename the default branch from a web browser. On GitHub, in your repo, go...
Read more >
Unable to change Default branch of a repository - GitLab.org
The default branch on one of our repos is permanently stuck on master . Attempting to change it to a different branch yields...
Read more >
Git remote default branch won't change - Stack Overflow
I have forked this repository but my problem is the first branch I pushed to the origin wasn't named master but let's say...
Read more >
Mirror does not update when initial default branch is an ... - Jira
Before the first push to a newly created repository, rename the local default branch from "master" to an arbitrary name i.e "test". When...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found