About Branches

Note: The Branches feature is only available in the new Contentstack interface.

Contentstack provides "Branches" to allow you to create multiple copies of your stack content. Every stack has a main branch by default. To create a new branch, you can fork a branch off of the main branch.

When you create a branch for the first time, the main branch becomes your source branch. For all subsequent branches you create, you need to specify a source branch from which it will inherit data.

About_Branches.png

Any child branch inherits all of the data from the source branch, including content types, global fields. entries, assets, languages, webhooks, and extensions. Now, when you make a change in the child branch, it does not affect the parent branch.

You can work on content maintained across each branch concurrently without affecting the other. Developers can update content models without affecting website content, while content managers can continue creating content for the website, simultaneously.

Consider the following real-world use cases of branches to understand how they are useful:

  • Content managers can use a separate branch within a single stack to preview stack content before going live
  • Developers can use a separate branch to remodel website content without affecting the live data
  • Developers and content managers can work concurrently on different copies of the same content to avoid data loss

Branches help provide a sync between your code and the content model. You need not make significant changes to your code. You only update your branches, publish the content on staging or development, and if it looks good, go ahead and publish it on production.

You can also assign aliases to your branches. An alias acts as a pointer to a target branch from which you have to pull content. You can point the alias to a specific branch within your frontend application code. The application then renders content to your website from the target branch.

For example, a "production" alias can point to different branches whenever you plan to go live with a new set of changes to your website content.

With this feature, you are in complete control of updating the content model or making changes to any content type.

You can browse through the topics mentioned in the “More Articles” section below to start managing content across branches.

Tutorial Video

Let's learn how to work with the Branches feature.

Was this article helpful?

Thanks for your feedbackSmile-icon

More articles in "Work with Branches"

On This Page

^