I want to start working with git workflow so I went ahead and started reading a lot. Including:
I have a few questions regarding it this model:
- what is the purpose of the master branch?
It's the branch which is cloned by default, so anyone cloning the repo can start from the last known good production point.
The release branches are for starting the next release cycle, so old ones can be pruned eventually, as they are meant to be merge into master once a release development cycle is completed.
- Assuming we don't have so frequent releases. Is it better to use master approach or keep the branches approach?
Keeping the branches is preferable, to isolate your next release development cycle in its own branch.
- I see facebook in react & react-native is using the "keep the branches" approach. why?
Because listing the branches makes it easy to explore the history specific to each release. You simply switch to the right branch.