🌐 Machine-translated from Russian. Show original
In this part:
Why negotiate branches
When more than one person works in the repository, chaos arises without rules: there is unfinished code in main , no one knows what's currently on sale, and the release turns into a "glue" of a dozen branches on the last night.
The branching strategy answers three questions:
- Where does stable code lie?
- Where is the development of the new task taking place?
- How does the code get to the product?
Three strategies that work
GitHub Flow — the simplest
- There is one long-lasting branch of
main— it is always ready to be displayed. - Each problem is a short branch of
feature/...frommain. - Ready → merge request → review → merge into
main→ automatic deployment.
Suitable for web services and teams with CI/CD, where they post frequently.
GitLab Flow — with environments
The same as GitHub Flow, plus environments or release branches:
main→ automatically to the test bench;production(orrelease/2026.11) → to the product; the code is entered there by merging frommainafter verification.
Suitable when there is acceptance between 'ready' and 'on prod': internal systems, 1C, banking integrations, scheduled display windows.
