Git Flow vs GitLab Flow

Git Flow 와 GitLab Flow 를 알아보자

Git workflow

graph LR
    A[Working copy] -->|git add| B[Index]
    B --> |git commit| C[Local repository]
    C --> |git push| D[Remote repository]

GitHub Flow

graph TD
    A[main branch] --> B[main branch]
    A2[nav branch] --> |add navigation|B
    B --> C[main branch]
    B2[feature-branch] --> |add feature|C
    C --> D[main branch]

GitLab Flow

graph TD
    subgraph repository
        dev
        prod
    end
    dev[development] --> dev2[development]
    dev2[development] --> dev3[development]
    dev3[development] --> dev4[development]
    dev4[development] --> dev5[development]
    prod[production] --> prod2[production]
    prod2[production] --> prod3[production]
    dev3 --> |deployment|prod2

Environment branches in GitLab Flow

graph LR
    subgraph repository
        st
        pre
        prod
    end
    st[staging] --> st2[staging]
    st2[staging] --> st3[staging]
    st3[staging] --> st4[staging]
    pre[pre-prod] --> pre2[pre-prod]
    pre2[pre-prod] --> pre3[pre-prod]
    pre3[pre-prod] --> pre4[pre-prod]
    prod[production] --> prod2[production]
    prod2[production] --> prod3[production]
    st -.-> |deploy to <br>pre-prod|pre2
    st3 -.-> |deploy to <br>pre-prod|pre4
    pre2 -.-> |production <br>deployment| prod2
  • GitLab Flow