Main Branch Guard for GitHub
Overview
Warns before you commit directly to the default branch using GitHub's web file editor.
GitHub's web-based file editor defaults its commit dialog to "Commit directly to the [branch] branch" — even when that branch is the repository's default branch. One misclick, and a change skips code review entirely. Main Branch Guard watches for exactly that moment: you clicking "Commit changes" while "Commit directly" is selected and the branch you're editing is the repository's own default branch. When that happens, it pauses the commit with a small on-page warning offering two choices — switch to "Create a new branch and start a pull request," or commit anyway if that's really what you meant. How it works: 1. Open any file in GitHub's web editor (the /edit/ view). 2. Make your change and click "Commit changes...". 3. If "Commit directly to the [branch] branch" is selected and that branch is the repository's default, Main Branch Guard pauses the submission and asks — "Create a branch instead" or "Commit anyway." 4. Editing a non-default branch, or already choosing "Create a new branch," commits normally with no interruption. Privacy and scope: - Runs only on GitHub's file-editor pages. - Reads only the branch names and commit-option selection GitHub already shows on the page. - Never commits, creates a branch, or opens a pull request itself — both warning choices only select GitHub's own radio option or replay GitHub's own Commit button. - No network requests, storage, analytics, accounts, advertising, or remote code. Main Branch Guard does one narrow job: make sure a direct commit to your default branch is a decision, not a default.
0 out of 5No ratings
Details
- Version0.1.0
- UpdatedAugust 20, 2026
- Offered byextenup
- Size18.41KiB
- LanguagesEnglish
- Developer
Email
extenup13@gmail.com - Non-traderThis developer has not identified itself as a trader. For consumers in the European Union, please note that consumer rights do not apply to contracts between you and this developer.
Privacy
Main Branch Guard for GitHub has disclosed the following information regarding the collection and usage of your data. More detailed information can be found in the developer's privacy policy.
Main Branch Guard for GitHub handles the following:
This developer declares that your data is
- Not being sold to third parties, outside of the approved use cases
- Not being used or transferred for purposes that are unrelated to the item's core functionality
- Not being used or transferred to determine creditworthiness or for lending purposes
Support
For help with questions, suggestions, or problems, visit the developer's support site