황성안 2021. 7. 15. 09:45
728x90
반응형

Gitflow란 Vincent Driessen가 만든 Git의 브랜칭 모델로 개발팀의 협업과 스케일링에 강점을 가지고 있습니다 ⚡

Vesioning 기반 환경에서 적합한 Git브랜칭 모델

아래는 Vincent의 포스팅과 Git Flow에 대한 이미지입니다.

이 글은 Vincent Driessen의 포스팅을 저의 입맛에 맞게 정리한 글입니다. 짧게요...☺️

*Author: Vincent Driessen
Original blog post: [<http://nvie.com/posts/a-succesful-git-branching-model>](<http://nvie.com/posts/a-succesful-git-branching-model>)
License: Creative Commons BY-SA*

A successful Git branching model

img

출처 : https://nvie.com/posts/a-successful-git-branching-model/

Git Flow의 branch

Main branches

img

출처 : https://nvie.com/posts/a-successful-git-branching-model/

#an infinite lifetime

  • master
    • We consider origin/master to be the main branch where the source code of HEAD always reflects a production-ready state.
  • 현재 Production-ready state를 항상 반영한다. (프로덕션의 현 상태)
  • develop
    • develop 브랜치에 있는 소스코드가 stable point에 도달했고, 릴리즈될 준비가 되면, master 브랜치와 merge한다. (release number를 붙여서). 이것을 새로운 프로덕션 릴리즈라고 정의 합니다.
  • 현재 the latest delivered development changes for the next release 상태를 반영합니다. (개발이 완료된 상태까지 반영)

Supporting branches

#limited life time #specific purpose

To aid parallel development between team members, ease tracking of features, prepare for production releases and to assist in quickly fixing live production problems

  • Feature branches
    • feature 브랜치는 개발자개인의 repo에만 존재합니다. (✖️ not in origin)
    Branch 생성
    $ git checkout -b myfeature develop
    Switched to a new branch "myfeature"
    
    다음 릴리즈에 포함되기로 결정한 feature인 경우, develop에 병합
    $ git checkout develop
    Switched to branch 'develop'
    $ git merge --no-ff myfeature
    Updating ea1b82a..05e9557
    (Summary of changes)
    $ git branch -d myfeature
    Deleted branch myfeature (was 05e9557).
    $ git push origin develop
  • 새로운 기능 개발을 위한 브랜치
  • Release branches
  • 새로운 프로덕션 릴리즈를 위한 브랜치(계획 됨)
  • Hotfix branches즉시 해결해야 하는 버그가 있는 경우
  • 새로운 프로덕션 릴리즈를 위한 브랜치(계획되지 않음.)

git branching을 연습해볼수 있는 사이트 : https://learngitbranching.js.org/?locale=ko

728x90
반응형