Could not change default branch #176843
Replies: 2 comments 2 replies
-
| If you're seeing the “Could not change default branch” error in some repositories, even without protection rules, here are a few things to check: 
 This issue often occurs when the branch hasn’t been pushed yet or when permissions are limited. If none of these apply, refreshing the page or trying again after a few minutes sometimes resolves transient UI glitches. | 
Beta Was this translation helpful? Give feedback.
-
| That usually happens because something in the repository’s settings or the organization’s policies is blocking the web interface from applying the change, even though the CLI call works. The web UI and the CLI go through slightly different permission checks, so it can fail in the browser while still working through the API. First, make sure the branch you’re trying to set as default is fully pushed and up to date. Then reload the repository settings page and try again in a private browser window to rule out cached state or browser extensions. If it still fails, open the developer console before clicking “Change default branch” and check for any specific error in the network or console tab GitHub sometimes returns a more detailed message there than what’s shown in the banner. | 
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
In half of my repos I could not change default branch.
No protection rules added...
I get message:

Without any explanation
Beta Was this translation helpful? Give feedback.
All reactions