A tool to replace the main branch for your repository on GitHub safely and easily.
main-branch
also guards against removing branches that will affect GitHub features based on the branch. It can also transfer the settings for some of those features to the new branch.
Branch Feature | Guards against | Transfers |
---|---|---|
Open PRs based on branch | ✅ | ✅ |
Branch protections | ✅ | TODO |
GitHub Pages | ✅ | TODO |
Not supported yet:
- Renaming your branches locally in a git repository.
Install (currently relies on node
) and replace master
with main
:
npm install -g main-branch
main-branch replace owner/repo
More commands (info, set, create, delete, replace):
main-branch help
https://garron.net/app/main-branch/
- For convenience, an alias of the
main-branch
binary calledmain
is also installed. - You can use the repo URL instead of
owner/repo
format.
See example.md for example output.
No, it just makes our terminology more inclusive.
Consider donating to the Minnesota Freedom Fund or another non-profit, advocating for important changes in your community, or putting your body/privilege on the line for change.
Thanks to everyone interested and working to change default branch names!
Thanks to @PurpleBooth
for the original core API code.