[๊ฐ์ ์์]
Git flow model - ์ํ์ฝ๋ฉ
[์ฐธ๊ณ ์๋ฃ]
์ฐ์ํ ํ์ ๋ค - ์ฐ๋ฆฐ Git-flow๋ฅผ ์ฌ์ฉํ๊ณ ์์ด์
branch ์ข ๋ฅ
- master - ํญ์ ์คํ ๊ฐ๋ฅํ ์ํ ์ ์ง
- develop - ๊ฐ๋ฐ์ฉ
- feature - ๊ธฐ๋ฅ ๋จ์ ๊ฐ๋ฐ์ฉ
- release - master๋ก ์ฎ๊ธฐ๊ธฐ์ ๊ฒ์์ฉ
- hotfix - ๊ธํ๊ฒ ๊ณ ์ณ์ผ ํ๋ ์ฝ๋ ๋๋ฒ๊น ์ฉ
- develop branch์์ ์์
git checkout -b feature/[๊ฐ๋ฐ๊ธฐ๋ฅ]์ผ๋ก feature branch ์์ฑ ๋ฐ ์ด๋- feature/[๊ฐ๋ฐ๊ธฐ๋ฅ]์์ ๊ฐ๋ฐ ์งํ ๋ฐ ์์
์ข
๋ฃ ํ commit and push
- ์ด๋ commit์ ์ต์ํ์ผ๋ก
- ๊ฐ๋ฐ์ด ์๋ฃ๋๋ฉด
git checkout develop์ผ๋ก ์ด๋ git merge --no-ff feature/[๊ฐ๋ฐ๊ธฐ๋ฅ]์ผ๋ก develop์ ๋ณํฉgit branch -d feature/[๊ฐ๋ฐ๊ธฐ๋ฅ]์ผ๋ก ์ด์ฉ์ด ๋๋ ๋ธ๋ ์น ์ ๊ฑฐ
- develop branch์์ ์์
git checkout -b release/[version]์ผ๋ก release branch ์์ฑ ๋ฐ ์ด๋git merge develop์ผ๋ก ์ง๊ธ๊น์ง ๊ฐ๋ฐ ๋ด์ฉ ์ ์ฅ- ๋ง์ฝ ์์ ํ ๋ด์ฉ ์์ผ๋ฉด release/[version]์์ ๋ฐ๋ก ๋ฐ๋ก ์์
git checkout master๋ก master branch๋ก ์ด๋- master branch๋ก์ ๋ณํฉ ์ ์๋ ํญ์ ์ฝ๋ ๋ฆฌ๋ทฐ๋ฅผ ๋ถํํ ๊ฒ!
git merge --no-ff release/[version]์ ํตํด release/[version]๋ฅผ master์ ๋ณํฉgit checkout develop์ผ๋ก develop branch๋ก ์ด๋git merge --no-ff release/[version]์ ํตํด release/[version]๋ฅผ develop์ ๋ณํฉgit branch -d release/[version]์ผ๋ก ์ด์ฉ์ด ๋๋ release/[version] branch ์ ๊ฑฐ
- master branch์์ ์ค๋ฅ ๋ฐ์์
git checkout -b hotfix/[hotfix๋ด์ฉ]์ผ๋ก hotfix branch ์์ฑ ๋ฐ ์ด๋- hotfix branch ๋ด์์ ์ค๋ฅ ํฝ์ค
git checkout -b release/[version]์ผ๋ก release branch ์์ฑ ๋ฐ ์ด๋- ๋ง์ฝ ํ์ฌ ์ฌ์ฉ์ค์ธ release branch๊ฐ ์๋ค๋ฉด ๊ทธ branch๋ก ์ด๋
git merge --no-ff hotfix/[hotfix๋ด์ฉ]์ผ๋ก hotfix ๋ด์ฉ ์ ์ฉgit checkout master๋ก master branch๋ก ์ด๋git merge --no-ff release/[version]์ผ๋ก hotfix ๋ด์ฉ ์ ์ฉ