Moving from a master to a version branch
Although master branches were commonly used in the Git world, the Drupal community uses major version branches (e.g., 8.x-1.x ) and semantic versioning branches (e.g., 1.0.x) instead, since master could be compatible with Drupal 6, Drupal 7, Drupal 8/9, etc.
Some Drupal projects may have a master branch that contains code that should be in a major or semantic version branch. For example, old projects that were converted around 2011 from CVS repositories ended up with master branches.
To convert an existing master branch to being a major or semantic version branch (1.0.x in this example), follow these steps:
- Make a new branch containing the code from the
masterbranch:
git checkout master git checkout -b 1.0.x git push origin 1.0.x - If the project has a development release that uses the
masterbranch, find this release either on the Project's main page or by clicking the View all releases link. Click the release title to go to the release page.

- Copy the URL to the release and include that in a Drupal.org infrastructure issue to request changing the release’s branch. Be sure to include the new branch’s name.
- Delete the
masterbranch:
git checkout 1.0.x git branch -D master git push origin :masterBe sure you've set the appropriate default branch as directed above before you delete master entirely. Otherwise, you may get a “deleting the current branch is denied” Git error if master is still your default branch.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion