Skip to content

Instantly share code, notes, and snippets.

@bogdan2510
Last active July 29, 2025 08:57
Show Gist options
  • Select an option

  • Save bogdan2510/fb7ce50adfa68f88fb4eb33710f7e66f to your computer and use it in GitHub Desktop.

Select an option

Save bogdan2510/fb7ce50adfa68f88fb4eb33710f7e66f to your computer and use it in GitHub Desktop.

Git Workflow Documentation

This document describes our Git branching workflow strategy.

Workflow Overview

Our Git workflow consists of three main flows:

  1. Feature Development - New features are developed in feature branches
  2. Release Cycle - Releases go through QA testing before deployment
  3. Hotfix Flow - Critical fixes can be deployed directly from main

Visual Workflow Diagram

%%{init: { 
    'gitGraph': {
        'mainBranchName': 'main'
    },
    'themeVariables': {
        'git0': '#4285F4',
        'git1': '#34A853', 
        'git2': '#FBBC04',
        'git3': '#9E9E9E',
        'git4': '#EA4335',
        'gitInv0': '#FFFFFF',
        'gitInv1': '#FFFFFF',
        'gitInv2': '#000000',
        'gitInv3': '#FFFFFF',
        'gitInv4': '#FFFFFF',
        'gitBranchLabel0': '#FFFFFF',
        'gitBranchLabel1': '#FFFFFF',
        'gitBranchLabel2': '#000000',
        'gitBranchLabel3': '#FFFFFF',
        'gitBranchLabel4': '#FFFFFF'
    }
}}%%
gitGraph
    commit id: "Initial"
    branch develop
    checkout develop
    commit id: "Dev work"
    
    branch feature/new-feature
    checkout feature/new-feature
    commit id: "Feature work"
    commit id: "More feature work"
    
    checkout develop
    merge feature/new-feature
    commit id: "Feature merged"
    
    branch release/1.0.15
    checkout release/1.0.15
    commit id: "Release prep"
    commit id: "QA testing"
    
    branch bugfix/issue
    checkout bugfix/issue
    commit id: "Fix bug"
    
    checkout release/1.0.15
    merge bugfix/issue
    commit id: "Bug fixed"
    
    checkout main
    merge release/1.0.15
    commit id: "v1.0.15" tag: "v1.0.15"
    
    checkout develop
    merge release/1.0.15
    commit id: "Release merged back"
    
    checkout main
    branch hotfix/critical
    checkout hotfix/critical
    commit id: "Hotfix work"
    commit id: "Testing"
    
    checkout main
    merge hotfix/critical
    commit id: "v1.0.14-hotfix.1" tag: "v1.0.14-hotfix.1"
    
    checkout develop
    merge hotfix/critical
    commit id: "Hotfix in develop"
Loading

Flow Details

1. Feature Development

develop ──────● feature/new-feature
              │
              ▼ (work on feature)
              │
              ▼ (PR & review)
              │
develop ◄─────●

2. Release Cycle

develop ──────● release/1.0.15
              │
              ▼ (QA testing)
              │
              ├──● bugfix/issue
              │  │
              ◄──●
              │
              ▼ (QA approved)
              │
main    ◄─────● (tag: v1.0.15)
develop ◄─────●

3. Hotfix Flow

main ─────────● hotfix/critical
              │
              ▼ (fix & test)
              │
main    ◄─────● (tag: v1.0.14-hotfix.1)
develop ◄─────●
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment