08. git flow - nephilim/js-git-kata GitHub Wiki
2013-03-07
git flow
- a sample of simple, effective git branch model
- installation homebrew ๋ฑ์ผ๋ก ์ค์น
- ์ฃผ์ ๋ธ๋์น๋ค
- master: production release
- development: branch name for "next release" development
- features
- release
- hotfix
- support
practice
- ์ค์ต 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
- ๋๋ฒ์งธ ์ปค๋ฐ
- 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 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"
- 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
ํ๋ค.
- git graph ๋ฑ์ผ๋ก ๋ชจ์ ํ์ธ ํ rebase ๊ฒฐ๊ณผ๋ฅผ ๋ถ์ํด ๋ณด์