Your main branch isn't protected #23046
-
|
After running a bunch of commands trying to create and delete tags and branches, I see the following What is it, and how should I handle it? My other repositories don’t have it. |
Beta Was this translation helpful? Give feedback.
Replies: 15 comments 17 replies
-
|
This appears to be a nudge that GitHub is incrementally deploying. The best practice is to add protection. |
Beta Was this translation helpful? Give feedback.
-
|
Ditto- it is just a reminder to set some rules on your main branch - nothing to worry about! You can just set the rule to disallow direct pushing to main, for example, and it will go away. Hope that helps, G |
Beta Was this translation helpful? Give feedback.
-
|
Thanks. So what is the trigger? I did just notice that some of my other repositories have it, but can’t tell what sets them apart. |
Beta Was this translation helpful? Give feedback.
-
|
I doubt anyone from GitHub will answer. Large entities do A-B testing, canary releases, incremental releases, etc. Intro to Deployment Strategies: Blue-Green, Canary, and More | HarnessIn our Blue-Green vs Canary deployment strategies blog, we go over basic, rolling, blue-green, & canary to help you make the right choice. It’s possible they randomly selected one repository per user for some fraction of their user base. There’s no reason to do it for all your repositories, that’d presumably annoy you more, which isn’t what they need when they’re gathering data. Anyway, it is a best practice, so you could just take the hint and apply it everywhere (you don’t have to, I haven’t, although I probably will for the base repositories that I care about). |
Beta Was this translation helpful? Give feedback.
-
|
Well if everyone’s being pinged to ‘fix’ something, at the least a brief explanation is due so we don’t think we broke something. I hope they add some info or reply here. |
Beta Was this translation helpful? Give feedback.
-
|
I thought this feature was only available for paid tiers or public repos. That’s what their pricing page still says. I couldn’t find any announcement about Branch Protections being made available to everyone, did I miss something? |
Beta Was this translation helpful? Give feedback.
-
|
If you want a direct response, open a ticket via: GitHub SupportGitHub Support is here to help. Learn about GitHub products, browse our helpful resources, and contact support with your questions. Don’t expect an instant response (it could take 2 weeks, especially if they happen to take a company-wide vacation for a week, but that happened recently, so I don’t expect it to happen again anytime soon.) |
Beta Was this translation helpful? Give feedback.
-
|
I don’t think anyone has said they’re an unpaid-subscription w/ a private repo. |
Beta Was this translation helpful? Give feedback.
-
|
Sorry, I know OP didn’t say they were unpaid/private. I came here looking for info about the same topic and this was the only post I found on the matter. |
Beta Was this translation helpful? Give feedback.
-
|
This appeared on one of my repos when I pushed some commits to main branch and then did a It seems like this message appears when we force push something to the main branch. |
Beta Was this translation helpful? Give feedback.
-
|
perhaps just tangentially related but we have a free Github plugin that adds more granular controls to protected branches, merges, and code freezes. this also lets you add a “note” whenever a branch gets frozen, so other team members have context. 100% free for open source: Merge Freeze - GitHub MarketplaceThe code freeze tool to block merging and deployments Ryan |
Beta Was this translation helpful? Give feedback.
-
|
GitHub Support:
I've confirmed this, creating branch creates banner, deleting branch deletes banner. |
Beta Was this translation helpful? Give feedback.
-
|
I think you’ve hit the nail on the head: this is obviously a way GitHub has come up with to scare people who need to keep their repositories private into upgrading to a paid tier. |
Beta Was this translation helpful? Give feedback.
-
|
Same thing is happening to me |
Beta Was this translation helpful? Give feedback.
-
|
👋🏼 Thanks for the feedback, y'all. I'm Brandon Rosage, a product manager at GitHub, and I'm leading an initiative that introduced these messages about branch protection rules. The intent of introducing the message was to make the feature -- the ability to create rules that protect your branches -- more discoverable and accessible to all users. This intent was derived from feedback that users who use "protected branches" gave us regarding how highly they value it, despite having to work hard to learn about and/or stumble upon it in the first place. So we developed an initiative that introduces an experiment in which admins for any repo that has more than one branch and no existing branch protection rules is told that their default branch isn't protected, with a button to add a rule. In doing so, we also introduced access to creating branch protection rules on any repo. Before, it was inaccessible to private repos owned by accounts using GitHub Free. With the introduction of the experiment, however, those repos are limited only in the enforcement of the rules they create. We make an earnest attempt to communicate all of this as users encounter the messaging. But the feedback y'all have provided here is gold. So we'll be iterating this month to ensure the most effective treatment is used, and that we don't stoke any fear that something is broken. Rest assured, our intent is not to scare anyone (neither that anything is broken or that we prefer repos use a certain visibility setting). It's simply to communicate the value of a feature that users have told us they value, but had a hard time discovering. I'm happy to address any other concerns or questions here 👍🏼 |
Beta Was this translation helpful? Give feedback.




👋🏼 Thanks for the feedback, y'all. I'm Brandon Rosage, a product manager at GitHub, and I'm leading an initiative that introduced these messages about branch protection rules.
The intent of introducing the message was to make the feature -- the ability to create rules that protect your branches -- more discoverable and accessible to all users. This intent was derived from feedback that users who use "protected branches" gave us regarding how highly they value it, despite having to work hard to learn about and/or stumble upon it in the first place.
So we developed an initiative that introduces an experiment in which admins for any repo that has more than one branch and no existing branch p…