๐พ ๋ธ๋์น ์ ๋ต๐ ์ปค๋ฐ ๋ฉ์์ง ์ปจ๋ฒค์
โจ Git Hook ๊ธฐ๋ฅ ์ฌ์ฉํด๋ณด๊ธฐ [required]๐งฉ PR ์์ ๋ด๊ธธ commit ๋จ์
๐พ ๋ธ๋์น ์ ๋ต
- main - ์ต์ข ๋ฐฐํฌ ๋ธ๋์น ์ ๋๋ค.
- develop - ๋ฐฐํฌ ์ ๋ชจ๋ ๊ธฐ๋ฅ ๊ฐ๋ฐ, ์์ ์ฌํญ์ ํด๋น ๋ธ๋์น๋ก Merge๋ฉ๋๋ค.
- ์ด์ID - ๋ชจ๋ ๊ธฐ๋ฅ ๊ฐ๋ฐ, ๋ฆฌํฉํ ๋ง, ๋ฒ๊ทธ ํฝ์ค ๋ฑ์ ์ด์ ID๋ก ์์ฑํด์ ํด๋น ๋ธ๋์น์์ ์์ ํฉ๋๋ค.
๐ ์ปค๋ฐ ๋ฉ์์ง ์ปจ๋ฒค์
feat : ์๋ก์ด ๊ธฐ๋ฅ ์ถ๊ฐ
fix : ๋ฒ๊ทธ ์์ (ํต์ฌ ๋น์ฆ๋์ค ๋ก์ง)
refactor : ์ฝ๋ ๊ตฌ์กฐ ๋ณ๊ฒฝ ๋ฐ, ๋ค์ด๋ฐ ๋ณ๊ฒฝ ํฌํจ - (์ญ์ ํ์ผ ํฌํจ)
style : ๋ง๊ฐ ์ฒ๋ฆฌ , ์ปจ๋ฒค์
setting : dependency ์ค์
test : ${xxxx} ํ ์คํธ
docs : readme ๊ธฐ๋ฅ ๋ฆฌ์คํธ ์ถ๊ฐ
โจ Git Hook ๊ธฐ๋ฅ ์ฌ์ฉํด๋ณด๊ธฐ [required]
main
, develop
๋ธ๋์น์์๋ hooks ๊ฐ ๋ฌด์๋ฉ๋๋ค.
๊ทธ๋์ develop ๋ธ๋์น์์ ์๋ก์ด ๋ธ๋ ์น๋ฅผ ๋ฐ์ ๊ท์ฝ์ ๋ง์ง ์์ผ๋ฉด hook์ด ๊ฑธ๋ ค commit์ด ์๋ผ๋ ๊ฒ์ ์คํํด ๋ณผ ์ ์์ต๋๋ค.- ์ prepare-commit-msg.txt ํ์ผ์ ๋ค์ด ๋ฐ์ต๋๋ค.
- ํฐ๋ฏธ๋๋ก ํ๋ก์ ํธ ํด๋๋ก ์ด๋ํฉ๋๋ค
- cd .git/hooks
- ํ์ผ์ ๋ฃ์ต๋๋ค.
- mv prepare-commit-msg.txt prepare-commit-msg ๋ช
๋ น์ด ์
๋ ฅ
[ํ์ผ ์ด๋ฆ ๋ณ๊ฒฝ]
- chmod +x prepare-commit-msg ๋ช ๋ น์ด ์ ๋ ฅ
- ์ปค๋ฐ ๋ฉ์์ง - โaaโ

- ์ปค๋ฐ ๋ฉ์์ง - โaa:โ

- ์ปค๋ฐ ๋ฉ์์ง - โtest : testโ

๐งฉ PR ์์ ๋ด๊ธธ commit ๋จ์
feat: ${function} ๊ฐ๋ฐ
test: ${function} ๋จ์ ํ ์คํธ
test: ${function} ํตํฉ ํ ์คํธ
test : Following ๋จ์ํ ์คํธ(repository, service ,controller) test : Follwing ํตํฉํ ์คํธ feat : Following ๊ธฐ๋ฅ ๊ฐ๋ฐ