Git Commit Message

git commit message template ์ ์šฉํ•˜๊ธฐ

.gitmessage ํŒŒ์ผ ์ƒ์„ฑํ•˜๊ธฐ

touch .gitmessage

.gitconfig ํŒŒ์ผ ์ˆ˜์ •ํ•˜์—ฌ ํ…œํ”Œ๋ฆฟ ์ ์šฉํ•˜๊ธฐ

Global ์ ์šฉ

git config --global commit.template [template ํŒŒ์ผ]
git config --global commit.template .gitmessage

Repository ๋ณ„ ์ ์šฉ

git config commit.template [template ํŒŒ์ผ]
git config commit.template .gitmessage

.gitmessage template ์˜ˆ์‹œ

# <branch-name>: <subject>
# - content
# - content

######## Maximum length of content is 72 ########### -> |
# issue track number (#number)
# --- COMMIT END ---
# <type> Title
#   feature : New feature
#   fix     : Fix bug
#   refactor: Refactor code
#   style   : Change style of code(white space, semicolon etc)
#   test    : Add/Change/Delete test case
#   docs    : Add/Change/Delete document
#   build   : Change in build script
#   ci      : Change in ci script
#   chore   : etc
# ------------------
#     Capitalize the subject line
#     Use imperitive mood in subject
#     Do not use period at the end of subject
#     Seperate subject and content with a blank line
#     Use the body explain "what" and "why" vs "how"
#     Use "-" when content contains multiline
# ------------------

Last updated