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

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # 2.2\. 瀏覽托管項目 在上一節學習了如何建立GitHub的賬戶,接下來在建立自己的項目托管之前,先來看看別人是怎么做的。 在GitHub中搜索字符串“GotGit”,可以搜索到我建立的一個項目,項目地址是:[](https://github.com/gotgit/gotgit/)[https://github.com/gotgit/gotgit/](https://github.com/gotgit/gotgit/)。由上至下,GotGit項目首頁可以分為如下幾個區域。 * 區域一:項目概要介紹及版本庫URL等。 項目GotGit托管在組織賬號 gotgit 之下(項目 gotgit 最早由用戶 ossxp-com 創建,現已轉移到組織 gotgit 賬號之下。),并且已經有若干關注用戶和派生項目。最下面一行顯示版本庫的訪問地址,只顯示了HTTP和Git-daemon兩個協議的URL地址,這是因為當前用戶對該版本庫只具有只讀權限,因此沒有顯示SSH協議的URL地址。 [![../images/gotgit-repo-tree-1.png](http://www.worldhello.net/gotgithub/images/gotgit-repo-tree-1.png)](https://box.kancloud.cn/2015-07-09_559de203841e2.png) 圖2-10:版本庫概要信息 使用任意一種協議均可克隆該Git版本庫,但要注意只有Git 1.6.6及以上版本才支持智能HTTP協議,低版本Git則無法用HTTP協議克隆GitHub上的版本庫[[2]](https://github.com/blog/809-git-dumb-http-transport-to-be-turned-off-in-90-days)。 ``` $ git clone https://github.com/gotgit/gotgit.git ``` ``` 或者使用Git-daemon協議。 ``` ``` $ git clone git://github.com/gotgit/gotgit.git ``` * 區域二:代碼瀏覽子菜單及分支切換對話框。 默認項目代碼頁(即項目首頁)顯示項目文件列表(即Files子菜單),如圖2-11所示。右側還顯示項目gotgit/gotgit默認的分支為gh-pages而非常見的master分支。關于gh-pages分支,在“第3.5.2節?[_創建項目主頁_](http://www.worldhello.net/gotgithub/03-project-hosting/050-homepage.html#project-homepage)”會介紹該分支的神奇用途。 [![../images/gotgit-repo-tree-1-submenu.png](http://www.worldhello.net/gotgithub/images/gotgit-repo-tree-1-submenu.png)](https://box.kancloud.cn/2015-07-09_559de204bd809.png) 圖2-11:代碼瀏覽子菜單及分支 * 區域三:顯示最新提交的提交說明、提交用戶頭像、提交時間等提交信息。右側還顯示此次提交對應的提交ID。 [![../images/gotgit-repo-tree-2.png](http://www.worldhello.net/gotgithub/images/gotgit-repo-tree-2.png)](https://box.kancloud.cn/2015-07-09_559de20670506.png) 圖2-12:提交信息 * 區域四:目錄樹。每個目錄和文件后面還顯示最后一次變更的提交說明。 [![../images/gotgit-repo-tree-3.png](http://www.worldhello.net/gotgithub/images/gotgit-repo-tree-3.png)](https://box.kancloud.cn/2015-07-09_559de209382b0.png) 圖2-13:目錄樹 * 區域五:根目錄下的文件README.md格式化為HTML輸出。 GitHub內置了多種文本標記語言的支持,如Markdown、Textile、reStructuredText、asciidoc、Wiki等。當發現根目錄下的README文件后,會根據其擴展名判斷所用的標記語言類型,自動轉換為HTML格式顯示。 [![../images/gotgit-repo-tree-4.png](http://www.worldhello.net/gotgithub/images/gotgit-repo-tree-4.png)](https://box.kancloud.cn/2015-07-09_559de20ab086e.png) 圖2-14:README文件 在GitHub的頁面中可以使用鍵盤快捷鍵,按下問號(?)會在彈出窗口顯示當前頁面可用的快捷鍵。 在項目的代碼瀏覽頁按下字母“w”,彈出分支切換菜單,如圖2-15所示。 [![../images/gotgit-repo-switch-branch.png](http://www.worldhello.net/gotgithub/images/gotgit-repo-switch-branch.png)](https://box.kancloud.cn/2015-07-09_559de210b285c.png) 圖2-15:快捷鍵“w”切換分支 按下字母“t”,開啟目錄樹中文件查找和過濾。圖2-16就是在按下字母“t”后,當逐一輸入單詞“download”時的過濾效果。 [![../images/gotgit-repo-tree-filter.png](http://www.worldhello.net/gotgithub/images/gotgit-repo-tree-filter.png)](https://box.kancloud.cn/2015-07-09_559de2115636b.png) 圖2-16:快捷鍵“t”開啟過濾器在目錄樹中搜索 點擊代碼瀏覽子菜單中的“Commits”(提交)顯示版本庫GotGit的提交歷史,如圖2-17所示。 [![../images/gotgit-repo-commit-history.png](http://www.worldhello.net/gotgithub/images/gotgit-repo-commit-history.png)](https://box.kancloud.cn/2015-07-09_559de213e2992.png) 圖2-17:提交歷史 提交歷史頁面也支持快捷鍵,按下問號(?)或者點擊頁面中的鍵盤標志會顯示快捷鍵幫助。其中快捷鍵”j”和”k”用于在提交列表中向上和向下選擇提交,在選中的提交按下回車鍵,會顯示該提交包含的文件改動差異,如圖2-18所示。 [![../images/gotgit-repo-commit-diff.png](http://www.worldhello.net/gotgithub/images/gotgit-repo-commit-diff.png)](https://box.kancloud.cn/2015-07-09_559de2166c3a6.png) 圖2-18:文本文件改動差異 在文本文件的差異比較中,不但將有差異的行標識出來,還將行內具體改動的字詞用特殊顏色進行了標識,不由得感嘆GitHub的細致入微。 GitHub還支持對圖形文件的差異比較,并提供四種比較方式。在如下地址:[](http://git.io/image-diff)[http://git.io/image-diff](http://git.io/image-diff) (短格式URL,實際對應于:?[https://github.com/cameronmcefee/Image-Diff-View-Modes/commit/8e95f7)提供了一個示例提交。您可以去嘗試一下不同的圖形文件比較方式,以便更直觀地觀察圖形文件前后的改動](https://github.com/cameronmcefee/Image-Diff-View-Modes/commit/8e95f7)%E6%8F%90%E4%BE%9B%E4%BA%86%E4%B8%80%E4%B8%AA%E7%A4%BA%E4%BE%8B%E6%8F%90%E4%BA%A4%E3%80%82%E6%82%A8%E5%8F%AF%E4%BB%A5%E5%8E%BB%E5%B0%9D%E8%AF%95%E4%B8%80%E4%B8%8B%E4%B8%8D%E5%90%8C%E7%9A%84%E5%9B%BE%E5%BD%A2%E6%96%87%E4%BB%B6%E6%AF%94%E8%BE%83%E6%96%B9%E5%BC%8F%EF%BC%8C%E4%BB%A5%E4%BE%BF%E6%9B%B4%E7%9B%B4%E8%A7%82%E5%9C%B0%E8%A7%82%E5%AF%9F%E5%9B%BE%E5%BD%A2%E6%96%87%E4%BB%B6%E5%89%8D%E5%90%8E%E7%9A%84%E6%94%B9%E5%8A%A8)。 * 默認修改前后的兩幅圖片左右并排顯示,如圖2-19所示。 [![../images/image-diff-2-up.png](http://www.worldhello.net/gotgithub/images/image-diff-2-up.png)](https://box.kancloud.cn/2015-07-09_559de21a201a0.png) 圖2-19:左右并排比較圖形文件差異 * 選擇交換顯示比較修改前后的圖片,用鼠標左右拖動進度條,可以非常直觀地看到圖片的差異。如圖2-20所示。 [![../images/image-diff-swipe.png](http://www.worldhello.net/gotgithub/images/image-diff-swipe.png)](https://box.kancloud.cn/2015-07-09_559de21c8d6a9.png) 圖2-20:交換顯示圖形文件比較差異 * 還提供洋蔥皮和色差比較,自己動手試試吧。 網絡圖是GitHub的一大特色,顯示一個項目的版本庫被不同用戶派生(Fork)后,各個版本庫的派生關系。這個網絡圖最早使用Flash實現的,目前已經改為HTML5實現[[4]](https://github.com/blog/621-bye-bye-flash-network-graph-is-now-canvas)。圖2-21的示例網絡圖來自于Gitosis項目[[5]](https://github.com/res0nat0r/gitosis)。 [![../images/network-graph.png](http://www.worldhello.net/gotgithub/images/network-graph.png)](https://box.kancloud.cn/2015-07-09_559de21dc8991.png) 圖2-21:Gitosis項目網絡圖 Pull Requests(拉拽請求)是派生(Fork)版本庫的開發者向項目貢獻提交的方法。如圖2-22所示,GotGit項目目前沒有未被處理的Pull Request,但是可以看到有一個已經關閉的Pull Request請求。 [![../images/gotgit-repo-pull-request.png](http://www.worldhello.net/gotgithub/images/gotgit-repo-pull-request.png)](https://box.kancloud.cn/2015-07-09_559de21f409ae.png) 圖2-22:Pull Requests界面 這個Pull Request是GitHub用戶agate發現了GotGit腳本中一個和ruby1.9不兼容的Bug,當我把agate派生版本庫中的提交合并到GotGit版本庫后,該Pull Request自動關閉。整個Pull Request的變更記錄如圖2-23所示。 [![../images/gotgit-repo-pull-request-detail.png](http://www.worldhello.net/gotgithub/images/gotgit-repo-pull-request-detail.png)](https://box.kancloud.cn/2015-07-09_559de2208f576.png) 圖2-23:Pull Request的變更歷史 缺陷追蹤(Issue)也是GitHub工作流中一個重要的組件。GotGit項目用缺陷跟蹤系統幫助維護《Git權威指南》一書的勘誤,圖2-24可以看到當前有2個打開的問題和9個已關閉的問題。 [![../images/gotgit-repo-issue.png](http://www.worldhello.net/gotgithub/images/gotgit-repo-issue.png)](https://box.kancloud.cn/2015-07-09_559de225578af.png) 圖2-24:缺陷追蹤 GitHub還為項目提供報表分析。圖2-25是GotGit項目中用到的開發語言分布圖。 [![../images/gotgit-repo-graph-lang.png](http://www.worldhello.net/gotgithub/images/gotgit-repo-graph-lang.png)](https://box.kancloud.cn/2015-07-09_559de22743c5b.png) 圖2-25:GotGit項目開發語言分布圖 圖2-26是開發者對GotGit項目貢獻分布圖。 [![../images/gotgit-repo-graph-impact.png](http://www.worldhello.net/gotgithub/images/gotgit-repo-graph-impact.png)](https://box.kancloud.cn/2015-07-09_559de2285906e.png) 圖2-26:GotGit項目貢獻分布圖
                  <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>

                              哎呀哎呀视频在线观看