Owner Nikunj

Mobile App — Git Branching SOP

TL;DR

BranchCreated fromTargetsVersion bump
feature/*devdev
release/x.y.0devmainMinor: 1.3.x1.4.0
patch/x.y.zLast release tagmainPatch: 1.5.01.5.1
  • main and dev are protected — no direct pushes, PRs only.
  • Android and iOS use the same X.Y.Z version name but independent build numbers.

Branch Structure

main
 └── dev  ← active development (merged weekly into main)
      ├── feature/*  → targets dev
      ├── release/*  → targets main
      └── patch/*    → targets main

Release Flow

  1. Cut release/x.y.0 from dev
  2. Bump minor version automatically (e.g. 1.3.11.4.0)
  3. Raise fix/feature PRs targeting the release branch
  4. On finalisation:
    • Create tag (e.g. v34-1.2.0)
    • Merge releasemain

Major version bumps are done manually.


Patch Flow

  1. Cut patch/x.y.z from the last release tag
  2. Bump patch version automatically (e.g. 1.5.01.5.1)
  3. Raise fix PRs targeting the patch branch
  4. On finalisation:
    • Create tag (e.g. v45-1.5.2)
    • Merge patchmain

Versioning — Android & iOS

Both platforms use the same X.Y.Z version name format.

FieldAndroidiOS
Version nameversionNameCFBundleShortVersionString
Build numberversionCodeCFBundleVersion
  • Build numbers are independent unique integers per platform — not synced.
  • Platforms may release at different cadences; version names can diverge over time.

Branch Protection

All rules apply to main, dev, and release/*:

Rule
Require PR before merging
Require at least 1 approving review
Dismiss stale reviews on new push
Require CI status checks to pass
Disallow direct pushes (including admins)
Restrict branch deletion