Can someone suggest a simple git branching mode for website development. I have seen several discussions on successful git branching models, unfortunately they are all very complicated for our case. Most of the branching models are suited for softwares with versions and release cycles.
Our company manages several web portals. We have 5 people working on these sites. Most of the time 2-3 people might be working on the same websites, but on different sections (chances of conflict are near zero). We don’t have any versions or release cycles. A programmer will develop a particular section, after which it will be passed to another person, who will write content for the section and perform SEO. Once it is done, the section will be uploaded to the public website. In the mean time, another programmer might be working on updating an existing section. If a bug or error is reported, it will be fixed and uploaded immediately.
Usually, every week 2-3 new sections are added / updated.
Currently we have only one branch (master) and create a new branch only if the person is working on big change which will take more than 2 weeks to complete. The problem here is that the master branch is not in sync with the current production files. I would like to change this and move the development to another branch, so that bug fixes can be directly applied on the master branch without any worry.
Update
Is it bad to create a separate branch for each section? In other words, how much branching is considered too much?
You have a fairly sequential development cycle, so you are right: no need for tons of feature branches there.
A simple model:
The question is:
When there is a bug in prod (‘
master‘, the live website), can you fix it ondevbranch and include whatever development is in progress?Because if you can’t, that mean you have changes on
mastermust be merged back immediately ondev. If that fix is quickly done, you don’t even need a ‘fix‘ branch.In other word, you don’t need all the sophisticated model of “A successful Git branching model“.