Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,090 of 9,090 pages
About the help in other languages
All help pages

The first push and the default branch

Push a theme for the first time with main as its default branch, protect main from force pushes, and decide how work branches and pull requests flow into it.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/designers/distribution/first-push-and-default-branch.md

On this page

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

  1. Check the branch name: git branch --show-current prints main. If it prints something else: git branch -m main.

  2. Push and set the upstream:

    git push -u origin main

    Expected: branch 'main' set up to track 'origin/main'.

  3. Make sure GitHub uses it as the default:

    gh repo view yourvendor/mytheme --json defaultBranchRef --jq .defaultBranchRef.name

    Expected: main.

  4. Protect it against force pushes and deletion (Settings > Branches or Rules). A history that others have fetched must never be rewritten.

How changes flow

WayFits
Commit to main directlyOne maintainer, small fixes
A branch per change, merged by pull requestSeveral people, reviews wanted
Pull requests from forksOutside contributors

Whatever you choose, every release is a tag on main (GitHub releases).

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.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x