-
Notifications
You must be signed in to change notification settings - Fork 10
08. git flow
Dongwook Lee edited this page Mar 18, 2013
·
2 revisions
- a sample of simple, effective git branch model
- installation homebrew 등으로 설치
- 주요 브랜치들
- master: production release
- development: branch name for "next release" development
- features
- release
- hotfix
- support
- 실습 dir 생성 및 초기 커밋
- mkdir git-flow-test; cd git-flow-test; git init
- echo "fist" >> product.txt
- git add .
- git commit -m "first commit"
-
git flow init
- git flow 시작
- 두번째 커밋
- echo "second" >> product.txt
- git commit -am "second commit"
- feature-01 작성
git flow feature start feature-01
- echo "feature-01" >> product.txt
- git commit -am "feature-01 added"
- feature-01 마무리 안하고 feature-02 작성
git flow feature start feature-02
- cat product.txt
- feature는 development 에서 파생됨
- echo "feature-02:1" >> product.txt
- git commit -am "feature-02:1 added"
- echo "feature-02:2" >> product.txt
- git commit -am "feature-02:2 added"
-
git flow feature finish feature-01
- feature branch 삭제됐음을 확인
git flow feature finish feature-02
- merge conflict
- git add .; git commit
git flow feature finish feature-02
- release
- develop 브랜치에서 파생
- release 작업 브랜치이다
git flow release start 1.0
- echo "release 1.0" >> RELEASE
- git add RELEASE
- git commit -m "release note added"
git flow release finish 1.0
- release finish 후
- 출력 메시지의
Summary of actions:
를 살펴본다 - release: git graph
- 출발은 developmment 에서 분리된 branch
- master 브랜치와 머지
- developemnt 브랜치와 merge
- 출력 메시지의
- hotfix 처리하기
- git flow feature start feature-03
- echo "feature-03:1" >> product.txt
- git add product.txt
- git commit -m "feature-03:1 added"
- 출시된 프로그램에서 문제 발견!
- git flow hotfix start hotfix-01
- cat product.txt
- hotfix는 master 브랜치에서 생성됨
- echo "hotfix-01 patched" >> product.txt
- git commit -am "hotfix-01 patched"
- cat product.txt
- hotfix finish 후
- 출력 메시지의
Summary of actions:
를 살펴본다. - 역시 development 브랜치에 back-merge(master > dev)된다
- 출력 메시지의
- feature-03 계속 작업하기
- git branch로 현재 브랜치 확인(development)
- git checkout feature/feature-03
- echo "feature-03:2" >> product.txt
- git commit -am "feature-03:2 added"
- hotfix(development)를 현재 작업에 반영
-
git flow feature rebase
- 늘 강조했듯이, rebase 도중 conflict 처리한 후에는 add만하고
git rebase --continue
한다.
- 늘 강조했듯이, rebase 도중 conflict 처리한 후에는 add만하고
- git graph 등으로 모양 확인 후 rebase 결과를 분석해 보자
-