π‘ λ³Έ λ¬Έμλ 'Git Commit λ©μμ§ κ°μ΄λλΌμΈ'μ λν΄ μ 리ν΄λμ κΈμ λλ€.
Git Commit μνμ ν¬ν¨νμ¬ κ°μ΄λλΌμΈμ μ μν΄λμμΌλ©°, λ°λμ λ°λ₯΄μ§ μμλ 무방νλ μ°Έκ³ νμκΈ° λ°λλλ€.
μν μ»€λ° λ©μμ§ μμ(μμλ νκΈλ‘ μμ±λμμΌλ 컀λ°μ κ°κΈμ μμ΄λ‘ μμ±νμμ€):
72μ μ΄λ΄μ 짧μ μμ½
λ μμΈν μ€λͺ
μ μ λλ€. 72μ μ΄λ΄μ 짧μ μμ½μ 첫 μ€μ μ μ λ€
λΉ μ€μ νλ μ½μ
νκ³ , κ·Έ λ€μμ μμΈν μ€λͺ
μ μ λλ‘ νλ€.
μμ½λ§μΌλ‘ μΆ©λΆν κ²½μ° μμΈν μ€λͺ
μ μ μ§ μμλ μ’λ€.
μ»€λ° λ©μμ§λ λͺ
λ ΉνμΌλ‘ μ λλ‘ νλ€: Fix bug λΌκ³ μ μΌλΌ.
Fixed bug, Fixes bug λ±μ μ¬μ©νμ§ μλλ‘ νλ€.
μ΄λ μ»€λ° λ©μμ§κ° git merge νΉμ git revert λ±μΌλ‘ μμ±λλ μ»€λ° λ©μμ§μ
컨벀μ
μ΄ μΌμΉνλλ‘ νκΈ° μν¨μ΄λ€.
λ¨λ½ ꡬλΆμ λΉ μ€μ μ½μ
νμ¬ ν μ μλ€.
- μ΄λ κ² λ¦¬μ€νΈλ₯Ό νκΈ°νμ¬λ μ’λ€
- 리μ€νΈλ νμ΄ν(-) νΉμ λ³ν(*)λ₯Ό ν΅ν΄ μμ±νλΌ
μ’μ μ»€λ° λ©μμ§λ λ€μ λ¬Έμ₯μ λ€μ΄κ°μ λ λ¬Έλ²μ μΌλ‘ λ§μμΌ νλ€:
If applied, this commit will <your subject line here>
μ’μ μ»€λ° λ©μμ§λ₯Ό μμ±νκΈ° μν κ·μΉ
- Separate subject from body with a blank line
- Do not end the subject line with a period
- Capitalize the subject line and each paragraph
- Use the imperative mood in the subject line
- Wrap lines at 72 characters
- Use the body to explain what and why you have done something. In most cases, you can leave out details about how a change has been made.
μ»€λ° λ©μμ§κ° ν¬ν¨ν΄μΌ νλ μ 보
- Describe why a change is being made.
- How does it address the issue?
- What effects does the patch have?
- Do not assume the reviewer understands what the original problem was.
- Do not assume the code is self-evident/self-documenting.
- Read the commit message to see if it hints at improved code structure.
- The first commit line is the most important.
- Describe any limitations of the current code.
- Do not include patch set-specific comments.
λ λ§μ μ 보μ μμλ λ€μ λ§ν¬λ₯Ό μ°Έμ‘°νμμ€: GitCommitMessages - OpenStack
μ»€λ° λ©μμ§μ λ§ν¬, λ νΌλ°μ€λ₯Ό λ£λ λ²
컀λ°μ΄ λ§ν¬λ μ΄μλ₯Ό ν¬ν¨ν΄μΌ νλ€λ©΄, μ»€λ° λ©μμ§μ ν€λλ λ³Έλ¬Έμ μ½μ ν μ μλ€. μ§λΌ λ±μ μ¬μ©νλ κ²½μ° Jirafy μ κ°μ λꡬλ₯Ό μ¬μ©νμ¬ μ§§μ λ²νΈλ₯Ό μ΄μμ 맀μΉμν¬ μ μλ€.
ν€λ μμ:
[#123] κΉνμ #123λ§μΌλ‘ μ΄μμ 맀μΉμ΄ λλ€…
CAT-123 κ°μ λ°©μμ Jira μ΄μ 맀μΉμ©μΌλ‘ μ¬μ©νκΈ° μ’λ€…
λ³Έλ¬Έ μμ:
…
Fixes #123, #124
+ λ³ν©(merge) μ μ±
main λΈλμΉμ μ§μ μμ μ κΈμ§νλ©°, κ° λΈλμΉλ ν 리νμ€νΈ(pull request) μμ± ν λ³ν©ν©λλ€.
κ°λ³ κ°λ°μλ ν 리νμ€νΈ ν μ½λ리뷰λ₯Ό μμ²ν μ μμΌλ©°, μ½λλ¦¬λ·°κ° νμμλ κ²½μ° μ§μ λ³ν©ν μ μμ΅λλ€. κ·Έλ¦¬κ³ λ³ν©λ λΈλμΉλ μμ (delete)νλ κ²μ μμΉμΌλ‘ ν©λλ€.
μΆκ°λ‘, λ³ν© ν λ¬Έμ λ₯Ό λ°©μ§νκ³ μ mergeμ κ° λΈλ μΉμ mainμ λ¨Έμ§ν ν λ¬Έμ κ° μλ κ²μ νμΈ ν μ΄λ₯Ό λ€μ mainμ λ¨Έμ§νλ μμ μ μ§ννλ©΄ μ’μ΅λλ€.
μ°Έκ³
- [Blog] tbaggery - A Note About Git Commit Messages: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
- [Blog] GitCommitMessages - OpenStack: https://wiki.openstack.org/wiki/GitCommitMessages
- [Blog] How to Write a Git Commit Message: http://chris.beams.io/posts/git-commit/
'Study: DeveloperTools(DevTool) > DevTool: Git' μΉ΄ν κ³ λ¦¬μ λ€λ₯Έ κΈ
[Git] resetκ³Ό revert μκ³ μ¬μ©νκΈ° (0) | 2022.07.20 |
---|---|
[Git] git tag & λ²μ λλ²λ§ κ·μΉ: gitμ λ²μ κ΄λ¦¬λꡬμ΄λ€!! (0) | 2022.07.06 |
[Git] ssh 곡κ°ν€ GitHubμ λ±λ‘νκΈ° (feat. github, bitbucket) (0) | 2022.06.21 |
[Git] Git Personal Access Token λ°κΈ κ³Όμ (μ¬μ§ ν¬ν¨)! (0) | 2022.04.17 |
[Git] Git-Workflow, git νλ¦μ μ΄ν΄λ³΄μ! (0) | 2022.02.24 |