# Git Commit Message Style 2021.10.21 JC --- ## Outline `----` - **起源** - 格式 - Demo --- ## 起源: Angular 專案 `----` - **AngularJS 專案歷程** (2010 - 2021.10) - 77 Branches - 22,199 commits - 179 Open PR (Review 中) - **日益複雜的開發紀錄** 核心團隊訂定了一致的 Commit Guideline --- ## 起源: Git Commit Guideline `----` > "This leads to more **readable messages** that are easy to follow when looking through the project history. But also, we use the git commit messages to **generate the Angular change log**"" https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines --- ## Outline `----` - 起源 - **格式** - Demo --- ## 格式 `----` - Commit Message Format - **header**: type / scope / subject - **body**: include the motivation (Why/What) for the change - **footer**: contain a closing reference to an issue if any ``` <type>(<scope>): <subject> <空行> <body> <空行> <footer> ``` --- ## 格式 `----` ![Example](https://4.bp.blogspot.com/-HdNhJQb0D94/XMvqErOYGLI/AAAAAAAAAQ8/FQiuZsG7TT0WcQ8Q4zcccHCsuBOEDrouACLcBGAs/s1600/222.png) https://wadehuanglearning.blogspot.com/2019/05/commit-commit-commit-why-what-commit.html --- ## Demo `----` https://github.com/angular/angular/commits/master
{"metaMigratedAt":"2023-06-16T12:53:50.455Z","metaMigratedFrom":"YAML","title":"Git Commit Message Style","breaks":true,"slideOptions":"{\"transition\":\"slide\"}","contributors":"[{\"id\":\"c80ef140-0f75-4b34-9469-76234b9c87f3\",\"add\":7709,\"del\":6401}]"}
    155 views
   owned this note