Why is the develop branch needed?
The develop branch exists to be the central branch of active development, where all new changes are gathered before reaching production.
Put simply: develop is the team's "sandbox," where code is already gathered together but is not yet a release.
The main role of the develop branch
develop is used in Gitflow and performs several important functions.
Why develop is needed
1. A common integration point for features
- all
feature/*branches are merged intodevelop - that is where the code first meets other code
- it shows how the features work together
develop shows the current state of the upcoming version.
2. Isolating production
mainstays stable- no "raw" features reach production directly
- errors are caught before the release
Fewer risks for users.
3. A basis for releases
- once functionality is ready, a
release/*branch is created fromdevelop - no new features are added in
releaseanymore - only fixes and version preparation
A clear, controlled release process.
4. Simplifying parallel work
- developers work independently in
feature/* developis updated regularly- conflicts are found earlier
What is NOT done in develop
- it is not deployed to production
- urgent production hotfixes are not made there
- direct commits are not made there (usually only through a PR)
Visually (logic, not a diagram)
main- what is already in productiondevelop- what will be in the next releasefeature/*- what is currently in progress
When develop is not needed
develop is often not used if:
- Feature Branch Workflow is used
- trunk-based development is used
- releases are frequent and automated
In these cases:
- feature branches are merged directly into
main
Short answer for an interview
The
developbranch is needed as the central development branch in Gitflow: all new features are gathered there before a release, release branches are formed from it, and the production branchmainstays stable.
Short Answer
Interview readyA concise answer to help you respond confidently on this topic during an interview.