@@ -263,6 +263,80 @@ gitGraph
263263 merge main id: "1.1.1-beta.1.post.1" tag: "sync release"
264264```
265265
266+ ### Complex Release Branch Management
267+
268+ ** Purpose** : Shows Zerv Flow handling complex release branch scenarios including branch abandonment and cascading release preparation.
269+
270+ ** Scenario Overview** :
271+
272+ - Main branch has ` v1.0.0 `
273+ - Release branch ` release/1 ` is created from main for next release preparation
274+ - ` release/1 ` gets 3 commits but critical issues are discovered, leading to abandonment
275+ - Release branch ` release/2 ` is created from the ** second commit of release/1** (not from main)
276+ - ` release/2 ` completes successfully and merges to main as ` v1.1.0 `
277+
278+ ** Key Zerv Flow behaviors demonstrated** :
279+
280+ - ** Release branch creation** : ` release/* ` branches use commit distance from their creation point
281+ - ** Branch abandonment** : ` release/1 ` shows incomplete release cycles with proper versioning throughout
282+ - ** Selective branch creation** : ` release/2 ` created from specific commit in ` release/1 ` (not from main)
283+ - ** Version isolation** : Each release branch maintains independent version progression
284+ - ** RC pre-releases** : Both release branches use ` rc ` identifier for release candidates
285+ - ** Post-release continuity** : Commit distances continue from branch creation points
286+ - ** Clean release finalization** : Main branch maintains clean semantic versions on release
287+
288+ ``` mermaid
289+ ---
290+ config:
291+ logLevel: 'debug'
292+ theme: 'base'
293+ ---
294+ gitGraph
295+ %% Step 1: Initial state: main branch
296+ commit id: "1.0.0"
297+
298+ %% Step 2: Create release/1 from main for next release preparation
299+ branch release/1 order: 2
300+ checkout release/1
301+ commit id: "1.0.1-rc.1.post.1"
302+ commit id: "1.0.1-rc.1.post.2"
303+
304+ %% Step 3: release/1 gets third commit, but critical issues discovered
305+ %% First, create release/2 from the SECOND commit (before issues)
306+ %% release/1 at commit 2: 1.0.1-rc.1.post.2, so release/2 continues from post.2
307+ checkout release/1
308+ branch release/2 order: 1
309+ checkout release/2
310+ commit id: "1.0.1-rc.2.post.3"
311+
312+ %% Now go back to release/1 and add the problematic third commit
313+ checkout release/1
314+ commit id: "1.0.1-rc.1.post.3" tag: "issues found"
315+
316+ %% Step 4: release/2 completes preparation successfully
317+ checkout release/2
318+ commit id: "1.0.1-rc.2.post.4"
319+
320+ %% Step 5: Merge release/2 to main and release v1.1.0
321+ %% Note: release/1 remains abandoned and never merged
322+ checkout main
323+ merge release/2 id: "1.1.0" tag: "released"
324+ ```
325+
326+ ** Version progression details:**
327+
328+ - ** release/1** : ` 1.0.1-rc.1.post.1 ` → ` 1.0.1-rc.1.post.2 ` → ` 1.0.1-rc.1.post.3 ` (abandoned)
329+ - ** release/2** : Created from ` release/1 ` 's second commit (` 1.0.1-rc.1.post.2 ` ), continues as ` 1.0.1-rc.2.post.3 ` → ` 1.0.1-rc.2.post.4 `
330+ - ** Main** : Clean progression ` 1.0.0 ` → ` 1.1.0 ` (only from successful ` release/2 ` merge)
331+
332+ ** Key insights from this example:**
333+
334+ 1 . ** Branch isolation** : Each release branch maintains independent versioning regardless of parent/child relationships
335+ 2 . ** Selective branching** : Zerv Flow correctly handles branches created from specific historical commits
336+ 3 . ** Abandonment handling** : Unmerged branches don't affect final release versions on main
337+ 4 . ** Cascade management** : Complex branching scenarios where releases feed into other releases are handled transparently
338+ 5 . ** Clean main branch** : Main only receives versions from successfully merged releases, maintaining clean semantic versioning
339+
266340## Scope and Limitations
267341
268342- ** Scope** : Git state → semantic version mapping
0 commit comments