Different defaults with and without protection #18935
Open
+2
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Out of the box, (git push --force) is allowed "by default". With branch protection, it's not allowed "by default". These distinctions are not obvious because of two "default" contexts.
I struggle to explain that here and in text, but I think it's important to note, somehow. It certainly confused me.
Perhaps better would be a table of default values.
Columns to include: "default git", "default github", "default branch protection", "default [other contexts]";
and rows including all the different settings such as "enforce_admins", "allows_force_pushes", "allows_deletions", etc.
Why:
Why? I was confused by what "default" means. We configure our hundreds of repositories via Terraform. It seemed to me there was no point in setting "default" values to their "default" state. However, it was not clear to me that "default" has a different meaning based on context (with or without branch protection).
Closes [18936] "Explain different default contexts (fx with and without branch protection)"
#18936
What's being changed (if available, include any code snippets, screenshots, or gifs):
I offer an short paragraph, although I expect a side note box; or a table of settings, defaults, overrides; or rewording of extant paragraphs are likely better changes.
Check off the following:
Writer impact (This section is for GitHub staff members only):