Hi there, my goal is to understand better the “Branches” functionality that CS has available. I am struggling to understand a few concepts after reading the documentation.
- This link here has the following:
The development branch will now have a copy of all the content from the main branch (production). With this development branch, the developers can modify the structure, add new changes, iterate, and publish in a testing environment to preview the recent changes.
What is unclear to me, is how the developer actually previews changes. I have created a branch off of main: “development”. Inside this development branch, I want to update an entry (this entry already exists because it came from main). I make my updates, and then I go to publish to the development environment.
From my understanding, however, publishing to an environment seems useless unless you are using an alias. Unless you add the alias to the contentstack.Stack() sdk, you will always get the main branch’s content. Is my understanding correct here? What is the purpose of publishing on a separate branch if there is no alias? -
From the same link, the following is mentioned:
Once you are entirely sure of the changes made, you can make the development branch act as the source branch for the production environment using an alias. Create a new alias and assign it to the development branch.
So from my understanding, if I have an alias called “deploy”, and my intention is that the production website is always using this alias. The idea is that you make your new changes on your branch (in this case named Development), and when you’re happy with the changes, you swap the alias’s branch from main to development.
This is a bit of a weird concept to me, because now your production website will have an alias with the “development” branch applied to it. In actuality, do most people use release tags for branch names, vs development/production? I would think it would be weird to have production’s content coming from a source called “development”.
Hoping someone can help understand these usecases!
Thanks in advance!
Best answer by nick.nguyen
View original