git flow migration, stage branch 추가하기

gitGraph
  commit id: "main@0"
  branch stage
  branch dev
  checkout dev
  commit id: "dev@1"
  branch feature/A
  commit id: "A1"
  commit id: "A2"
  checkout dev
  merge feature/A tag:"merge A -> dev"
  branch feature/B
  commit id: "B1"
  checkout dev
  merge feature/B tag:"merge B -> dev"

  %% 승급: A는 준비됨, B는 미준비
  checkout stage
  merge feature/A tag:"promote A -> stage"
  checkout main
  merge stage tag:"stage -> main release"

  %% 백머지
  checkout dev
  merge main tag:"sync main -> dev"

Git Flow Migration steps

[스텝1]

git flow migration step 1 recommendation

  1. stage 생성(메인에서)

  2. dev에 쌓인 기능 분류 (출시 가능 vs 대기) -> 이때 태그 ready-for-stage 사용, ci 스크립트는 아직

  3. 출시 가능 feature -> stage 승급 PR 생성, 스테이징 배포, 이때 스테이징 서버는 아직

  4. stage -> main PR 머지, 태그 발행, 배포

  5. main -> dev 백머지, 경우에 따라 릴리즈노트/패치노트 작성 -> 수동 백머지 PR 미사용

[스텝2]

git flow migration step 2 recommendation

  1. dev에 쌓인 기능 분류: 이때 feature -> dev PR 태그 ready-for-stage 를 확인하여 Github Action CI 스크립트가 자동으로 stage를 베이스로 하는 promotion PR을 생성

  2. 만약 ready-for-stage 태그를 달지 않았다면 직접 feature -> stage promotion PR 생성

  3. stage -> main PR 머지, 태그 발행, 배포

  4. main -> dev 백머지: 수동 백머지