Best practices with Branches
Content creation and management can be a complex process, especially for enterprises with large-scale content operations involving multiple teams. To streamline workflows and enhance collaboration, the Contentstack Headless CMS offers independent workspaces—known as Branches—for developers to work on content models, facilitating the safe development of new features or significant changes and enabling content editors to continue to work in production without any interruptions.
Branches are independent copies of your content repository that allow team members to work on different content models simultaneously. Branches 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. These branches provide a secure and isolated environment where changes can be made, reviewed, and merged back into the main content model seamlessly.
Real-world use cases
Branches aligns perfectly with the Agile development methodology. Developers can create separate branches for a new set of related changes, enabling development to happen without disrupting content efforts. This approach enables continuous integration and seamless merging, ensuring a steady flow of updates and enhancements while maintaining stability.
Isolated content development
With Branches, developers can work on specific features, campaigns, or updates in parallel, without the fear of conflicting with editor's production changes. Developers and content managers can work concurrently on different copies of the same content without data loss. This isolation fosters efficient development and minimizes the risk of errors or content discrepancies.
Compare & Merge
With the Compare Branches feature, you can compare the differences between two branches. If you make changes to your content model in a branch and want to see what’s different, you can use this to do so. Once you are satisfied with your changes, you can integrate the changes in the current branch into another branch using the Merge Branches feature. You can merge two branches with the following strategies:
Prefer base: This enables you to add changes from the compare branch to the base branch, and when conflicts arise, it keeps the changes in the base branch and ignores the changes in the compare branch. Anything present in the base branch but not in the compare branch will be kept.
Prefer compare: This enables you to add changes from the compare branch to the base branch, and when conflicts arise, it keeps the changes in the compare branch and discards the changes in the base branch.
Overwrite with compare: This allows you to completely replace the base branch with the changes from the compare branch. Anything in the base branch that is not present in the compare branch will be lost.
Merge new only: This allows you to merge only the new changes from the compare branch to the base branch and ignores any modified changes in the compare branch.
Merge modified with prefer base: This allows you to add only the modified changes from the compare branch to the base branch. When conflicts arise, it keeps the modified changes of the base branch and ignores the modified changes of the compare branch. Any new items in the compare branch are ignored.
Merge modified with prefer compare: This allows you to add only the modified changes from the compare branch to the base branch. When conflicts arise, it keeps the modified changes of the compare branch and ignores the modified changes of the base branch. Any new items in the compare branch are ignored.
Ignore: This allows you to ignore all changes from the compare branch, keeping the base branch as it is. This can be used to ignore a specific change or to ignore all changes and merge only specific changes.
Branches promotes a collaborative content development process by enabling multiple contributors to work simultaneously on different aspects of a project. Teams can experiment, iterate, and refine their content models and test automated content updates without disrupting the main content repository.
Efficient content review
Branches provides a controlled environment for content model review and testing big scripted changes. Team members can review and provide feedback on the proposed changes before merging them into the main content repository. This ensures content quality and consistency while facilitating effective collaboration and knowledge sharing.
In case an issue arises or an experiment doesn't yield the desired results, Branches and Aliases allows for easy rollbacks without affecting the main content repository. Developers can maintain production content across different branches without affecting live website data. Aliases can always point back to the previously referenced content branch in case of unintentional content deployment. This feature provides a safety net, allowing developers to experiment and explore innovative ideas without fear of irreversible changes.
Branches is a valuable feature that empowers developers and business users to work efficiently, collaborate seamlessly, and deploy changes confidently. By embracing best practices and leveraging Branches effectively, teams can unlock new levels of productivity, accelerate development cycles, and deliver exceptional digital experiences. Branches serves as a catalyst for engineering innovation, ensuring that businesses stay ahead of the curve in an ever-evolving digital landscape without disrupting editors in production.
If you’re fascinated by the possibilities around streamlined development and innovation flexibility, we invite you to dive into our Branches documentation.
Enhancing digital experiences with the power of personalization
Personalization is tailoring digital experiences and content to individual preferences and needs. It involves analyzing user behavior, preferences, and interests and using that information to provide customized content and interactions. Personalization can take many forms, from personalized product recommendations and emails to bespoke website experiences. Possibilities of personalization Incr
End-of-Year 2023 Platform Recap: Contentstack’s latest innovations and what’s ahead
Streamlined Data Structure with Advanced Taxonomy With Advanced Taxonomy, managing complex data structures is no longer daunting. Particularly beneficial for large enterprises, this tool redefines how content is categorized and retrieved, making data management more intuitive and efficient. It's ideal for sectors like e-commerce and media, where organizing a vast array of products or articles
Latest platform releases: UI updates, enhanced search, expanded Live Preview service, and more
Navigation & layout improvements Data tables for list pages The list pages of all modules now feature newer and more flexible tables, allowing you to adjust and customize your table view to your liking and more easily navigate through data to find exactly what you need. Easy column management: The ability to move, resize, reorder, freeze/unfreeze, and add/remove columns as needed in th
Keys to unlocking global potential with localized digital experiences
In today's interconnected world, businesses are no longer confined to their local markets or within the borders of their home countries. The way brands interact with global audiences has gone through another makeover, all thanks to the digital revolution. With the proliferation of highly personalized digital experiences and globalization, companies increasingly have the opportunity to expand the
Accelerate custom app development with boilerplates
The digital landscape is constantly evolving, and with it, platforms need to offer customizable, adaptable solutions. This is where Contentstack's Developer Hub steps in, especially as it approaches its General Availability (GA) launch later this month. Here, the spotlight is on our app boilerplates – essential building blocks that streamline developing and deploying custom applications that ext