Real-world strategy for complex Android / backend teams building dependent features with staggered releases.
π― Problem Scenario
You have:
- Multiple teams working in parallel
- Feature dependencies (Feature 2 depends on Feature 1)
- Partial releases
- Feature flags controlling exposure
- Independent features going on at the same time
Release Plan
| Week | Release Content |
|---|---|
| Week 1 | Feature 1 (Partial) |
| Week 2 | Feature 1 (Controlled) + Feature 2 (Partial) |
| Final | Feature 1 (Full) |
| Final | Feature 2 (Full) |
And some parts of Feature 1 must be OFF while Feature 2 is released.
This is not theoretical. This is production reality.
π¨ What Goes Wrong Without Strategy
- Massive merge conflicts
- Long-lived feature branches
- Inconsistent environments
- Broken CI
- βIt works in my branchβ syndrome
- Release panic
So we need:
β Predictable branch flow
β Clear dependency control
β Controlled releases
β Feature isolation
β Conflict minimization
π Branching Strategy Overview
Instead of long-lived feature branches merging at the end, we use:
-
mainβ Production -
developβ Integration -
release/*β Weekly release branches -
feature/*β Short-lived branches - Feature Flags β Control exposure
π³ High-Level Branch Flow
main
|
|-----------------------------|
| |
develop -------------------------
| | | |
| | | |
feature/F1 feature/F2 feature/F3 (independent)
| |
| |
|------------|
(merge early because F2 depends on F1)
π₯ Core Principle #1 β Merge Early, Hide with Feature Flags
Instead of waiting:
β Donβt keep Feature 1 in isolation until fully complete.
Instead:
β
Merge incomplete Feature 1 to develop
β
Hide incomplete parts behind feature flags
Example:
if (featureToggle.isFeature1PartialEnabled()) {
showNewDashboard()
}
Feature toggles let you:
- Merge early
- Reduce conflicts
- Control rollout
- Disable partial implementation
This is critical in fintech apps.
π§© Handling Feature Dependency (F2 depends on F1)
Correct Approach
- F1 starts from develop
- F1 merges to develop early (behind flag)
- F2 branches from updated develop
- F2 builds on F1βs base safely
Why?
If F2 branches before F1 merges β
You create a dependency merge nightmare later.
π
Week-by-Week Flow
π’ Week 1 β Release Partial Feature 1
Branch Structure
develop
|
|---- release/week-1
Steps:
- Merge partial F1 into develop
- Create release/week-1
- Enable only partial F1 via feature flag
- Merge release into main
- Tag version
main β release/week-1
π‘ Week 2 β Release F2 + Controlled F1
Now:
F2 already built on F1 (because F1 was merged early)
Some F1 parts must remain OFF
Branch Flow
develop
|
|---- release/week-2
Enable:
- F2 partial β ON
- F1 advanced parts β OFF
Controlled via:
- Remote config
- Build config
- Runtime toggles
No branching trick. Just feature control.
π Final Releases
When Feature 1 is complete:
- Ensure all parts merged into develop
- Enable all F1 flags
- Create release branch
- Merge to main
- Same for Feature 2.
π Independent Feature Development
Now letβs add complexity:
Feature 3, Feature 4, Feature 5
All independent.
Branch Structure
develop
| | | |
F1 F2 F3 F4
Rules:
β All feature branches short-lived
β Rebase frequently from develop
β Merge early
β Use feature flags
β Avoid feature-to-feature direct merges
β Conflict Minimization Rules
Rule 1 β No Long-Lived Feature Branches
If a branch lives > 1 week β risk increases 3x.
Merge incomplete but hidden.
Rule 2 β Daily Rebase or Merge from Develop
git checkout feature/F2
git fetch
git rebase origin/develop
This keeps branch fresh.
Rule 3 β Avoid Branching from Another Feature
Never:
feature/F2 from feature/F1
Always:
feature/F2 from develop
Even if dependent.
Because F1 should already be merged (hidden).
Rule 4 β One Release Branch Per Release
Release branches are temporary stabilization zones.
develop β release/x β main
Hotfix goes:
main β hotfix/x β main β develop
π Full Flow Diagram (Complex Case)
main
^
|
release/week-1
^
|
develop ----------------|----------------------
| | | | | |
F1 F2 F3 F4 F5 F6
| |
|-------|
(F2 depends on F1)
π§ Advanced Technique (For Large Teams)
If you are working in something like:
- Multi-module Android Super App
- Microservice backend
- Fintech compliance system
Then consider:
1οΈβ£ Module Isolation
Feature per module reduces conflict dramatically.
2οΈβ£ Trunk-Based Development (Advanced)
For very mature teams:
- No long feature branches
- Everyone merges to develop daily
- Everything hidden behind flags
Used by:
- Meta
- Netflix
π Feature Flag Strategy (Very Important)
Types of flags:
| Type | Purpose |
|---|---|
| Build-time | Separate flavor builds |
| Runtime | Enable/disable dynamically |
| Remote config | Gradual rollout |
Example in fintech:
- Enable new KYC flow only for 10% users
- Enable F2 only after F1 baseline stable
π₯ What This Achieves
β Minimal conflicts
β Parallel development
β Safe dependency handling
β Flexible release planning
β Faster CI stability
β Reduced stress before release
π Final Golden Rules
- Merge early.
- Hide incomplete work with flags.
- Never branch from another feature.
- Rebase frequently.
- Keep release branches short-lived.
- Prefer integration over isolation.
π Final Thought
Multi-feature development is not about Git tricks. Itβs about discipline and integration mindset.
The real mistake teams make is confusing branch isolation with feature isolation.
Isolation should happen via flags β not branches.
Top comments (0)