Git flow


Git & Github #07


Branching model : Git flow



Git flow 5 branches

  • main:標準ブランチへの配布
  • develop:開発ブランチとして、開発者がそのブランチを基準に、それぞれの仕事の機能を統合
  • feature:開発単位機能の分岐.機能開発完了後、開発中
  • release:主配布に送信する前に品質検査の分岐を行う
  • hotfix:main配備、バグ発生時緊急復旧の分岐
  • 出典:https://uxgjs.tistory.com/183[UXワークステーション]

    example :

    $ git switch main #먼저, main으로 이동
    $ git flow init #enter…
    # 현재 branch는 develop
    $ git flow feature start print-branch
    # 현재 branch는 print-branch
    # ~작업~ $ git add file.txt $ git commit
    $ git flow feature finish print-branch
    # develop으로 merge, print-branch 삭제됨
    # develop에 기능들이 쌓였을 때
    $ git flow release start v0.0.1
    $ git flow release finish v0.0.1
    # Merge branch ‘release/v.0.0.1’ into main 이란 commit 생성됨
    # tag message 저장하면 tag 생성됨
    # Merge tag ‘v.0.0.1’ into develop 이란 commit 생성됨
    # 이 작업을 완료하면 main을 거쳐 현재 develop 로 이동
    $ git push -u origin develop #첫 push라서 -u쓰기
    $ git switch main
    $ git push origin main
    $ git tag #tag 확인
    $ git push --tags 
    ref : https://danielkummer.github.io/git-flow-cheatsheet/index.ko_KR.html