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