<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                針對項目的每一次Pull Request就相當于一次代碼評審,評審以討論的形式顯示在Pull Request中。 在Pull Request中還能夠看到對應的提交(一個或多個),并可以直接針對提交進行代碼評注。對于采用集中式協同的項目,即使較少使用 Pull Request,也同樣可以使用代碼評注。代碼評注會觸發通知郵件給項目的開發者。 代碼評注有兩種形式,一種是針對整個提交的評注,另外一種是對代碼進行逐行評注。 ## 4.4.1\. 提交評注 查看項目的提交歷史,從中選擇一個提交,如圖4-37所示。 [![../images/commit-history.png](http://www.worldhello.net/gotgithub/images/commit-history.png)](https://box.kancloud.cn/2015-07-09_559de44b713f9.png) 圖4-37:helloworld項目提交歷史 如圖4-38是查看提交的界面。除了提交說明、提交者信息之外,還顯示提交所修改的文件和改動差異。在查看提交頁面的最下方顯示一個提交評注對話框,可以在其中寫下評注。評注可以使用 Markdown 語法。 [![../images/commit-note.png](http://www.worldhello.net/gotgithub/images/commit-note.png)](https://box.kancloud.cn/2015-07-09_559de44f87839.png) 圖4-38:添加提交評注 添加評注后,所評注的提交的作者會收到通知郵件,提醒針對自己的提交有了新的評論。通知郵件如圖4-39所示。 [![../images/commit-note-email-notify.png](http://www.worldhello.net/gotgithub/images/commit-note-email-notify.png)](https://box.kancloud.cn/2015-07-09_559de455894a5.png) 圖4-39:提交評注的通知郵件 通過Web界面可以看到添加在提交下方的評注,并可以撰寫新的評注展開討論。評注者本人或提交的作者還可以編輯甚至刪除評注。如圖4-40所示。 [![../images/commit-note-admin.png](http://www.worldhello.net/gotgithub/images/commit-note-admin.png)](https://box.kancloud.cn/2015-07-09_559de45741733.png) 圖4-40:提交評注 GitHub還支持Git自身提供的評注功能[[1]](http://www.kernel.org/pub/software/scm/git/docs/git-notes.html),如圖4-41所示的是提交[http://git.io/git-notes](http://git.io/git-notes)(即網址?[https://github.com/ossxp-com/gitdemo-commit-tree/commit/e80aa74](https://github.com/ossxp-com/gitdemo-commit-tree/commit/e80aa74))的評注,這個評注并非通過GitHub添加的,而是由git-note命令提交的評注。這種評注針對一個特定提交只能有一個,GitHub只能顯示不能編輯和刪除。關于如何通過命令行查看git-note格式的評注,參見《Git權威指南》第570頁“41.5 Git評注”。 [![../images/commit-note-by-git-note.png](http://www.worldhello.net/gotgithub/images/commit-note-by-git-note.png)](https://box.kancloud.cn/2015-07-09_559de45d50e02.png) 圖4-41:git-note評注 ## 4.4.2\. 逐行評注 還是以gotgithub/helloworld版本庫中的提交為例,看一下GitHub支持的逐行評注功能,即針對提交中的任意一行添加評注。瀏覽提交,如圖4-42所示,當鼠標置于任意一行代碼時,在該行代碼的左側會顯示一個添加注釋的圖標。 [![../images/commit-line-note-btn.png](http://www.worldhello.net/gotgithub/images/commit-line-note-btn.png)](https://box.kancloud.cn/2015-07-09_559de45e0e1a7.png) 圖4-42:添加逐行評注按鈕 點擊該圖標(用于添加逐行評注的圖標),會顯示如圖4-43所示的添加逐行評注對話框。該評注對話框出現在兩行代碼之間,在其中寫下評注。 [![../images/commit-line-note-form.png](http://www.worldhello.net/gotgithub/images/commit-line-note-form.png)](https://box.kancloud.cn/2015-07-09_559de45f090b9.png) 圖4-43:添加逐行評注 添加評注后,項目的開發人員同樣會收到郵件通知。針對同一行代碼的多次評論按時間順序依次顯示,圖4-44展示了多個行間評注,其中一個評注還使用 Markdown 語法嵌入了一個圖片。 [![../images/commit-line-note.png](http://www.worldhello.net/gotgithub/images/commit-line-note.png)](https://box.kancloud.cn/2015-07-09_559de46019001.png) 圖4-44:逐行評注和提交評注 更有意思的評注可以圍觀MrMEEE/bumblebee項目的一個bug修正提交(被戲稱一個空格引發的慘案)。地址:?[http://git.io/giant-bug](http://git.io/giant-bug)(即網址 [https://github.com/MrMEEE/bumblebee/commit/a047be85247755cdbe0acce6](https://github.com/MrMEEE/bumblebee/commit/a047be85247755cdbe0acce6))。
                  <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>

                              哎呀哎呀视频在线观看