<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                [TOC] > [參考](https://www.ruanyifeng.com/blog/2016/01/commit_message_change_log.html) ## 作用 1 .提供更多的歷史信息 ``` > git log --pretty=format:%s [撤銷]組織架構兼容金倉的null模式 [修復]消息管理器的兼容金倉 ``` 2. 可以過濾某些commit ``` git log <last release> HEAD --grep feature ``` 3. 可以直接從commit生成Change log ## 格式 格式: ``` <type>(<scope>): <subject> // 空一行 <body> // 空一行 <footer> ``` - Header 是必需的,Body 和 Footer 可以省略 - 任何一行都不得超過72個字符 ### type ``` build 對構建系統或者外部依賴項進行了修改 ci 對CI配置文件或腳本進行了修改 docs 對文檔進行了修改 feat 增加新的特征 fix 修復bug pref 提高性能的代碼更改 refactor 既不是修復bug也不是添加特征的代碼重構 style 不影響代碼含義的修改,比如空格、格式化、缺失的分號等 test 增加確實的測試或者矯正已存在的測試 ``` > 如果`type`為`feat`和`fix`,則該 commit 將肯定出現在 Change log 之中。 > 其他情況(`docs`、`chore`、`style`、`refactor`、`test`)由你決定,要不要放入 Change log,建議是不要 ### scope - scope用于說明 commit 影響的范圍,比如數據層、控制層、視圖層等等,視項目不同而不同 ### subject - subject是 commit 目的的簡短描述,不超過50個字符。 - 以動詞開頭,使用第一人稱現在時,比如change,而不是changed或changes - 第一個字母小寫 - 結尾不加句號 ### Body Body 部分是對本次 commit 的詳細描述,可以分成多行。下面是一個范例。 ``` More detailed explanatory text, if necessary. Wrap it to about 72 characters or so. Further paragraphs come after blank lines. - Bullet points are okay, too - Use a hanging indent ``` 有兩個注意點。 - 使用第一人稱現在時,比如使用change而不是changed或changes。 - 應該說明代碼變動的動機,以及與以前行為的對比 ### Footer 1. 不兼容變動 如果當前代碼與上一個版本不兼容,則 Footer 部分以`BREAKING CHANGE`開頭,后面是對變動的描述、以及變動理由和遷移方法 1. 關閉 Issue ``` Closes #234 //關閉多個 Closes #123, #245, #992 ``` ### Revert 如果當前 commit 用于撤銷以前的 commit,則必須以`revert:`開頭,后面跟著被撤銷 Commit 的 Header ``` revert: feat(pencil): add 'graphiteWidth' option This reverts commit 667ecc1654a317a13331b17617d973392f415f02. ``` - Body部分的格式是固定的,必須寫成`This reverts commit &lt;hash>.`,其中的`hash`是被撤銷 commit 的 SHA 標識符 ## idea 插件 使用 [Git Commit message Helper](https://plugins.jetbrains.com/plugin/13477-git-commit-message-helper) ![](https://raw.githubusercontent.com/AutismSuperman/git-commit-message-helper/master/image/operation.gif)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看