The first push and the default branch
This page is for designers publishing a repository for the first time.
Why main
The Exponential repositories use main as their default branch. Composer users who want the newest unreleased code
of your theme require dev-main; a different branch name means a different constraint (dev-master, dev-trunk)
and confusion. Use main from the start.
Step by step
Check the branch name:
git branch --show-currentprintsmain. If it prints something else:git branch -m main.Push and set the upstream:
git push -u origin mainExpected:
branch 'main' set up to track 'origin/main'.Make sure GitHub uses it as the default:
gh repo view yourvendor/mytheme --json defaultBranchRef --jq .defaultBranchRef.nameExpected:
main.Protect it against force pushes and deletion (Settings > Branches or Rules). A history that others have fetched must never be rewritten.
How changes flow
| Way | Fits |
|---|---|
Commit to main directly | One maintainer, small fixes |
| A branch per change, merged by pull request | Several people, reviews wanted |
| Pull requests from forks | Outside contributors |
Whatever you choose, every release is a tag on main (GitHub releases).
Related pages
- Creating the GitHub repository
- Pull requests to someone else's theme
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.