<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之旅 廣告
                # 項目分享與更新 在 Git 中沒有多少訪問網絡的命令,幾乎所以的命令都是在操作本地的數據庫。 當你想要分享你的工作,或者從其他地方拉取變更時,這有幾個處理遠程倉庫的命令。 ## git fetch `git fetch`?命令與一個遠程的倉庫交互,并且將遠程倉庫中有但是在當前倉庫的沒有的所有信息拉取下來然后存儲在你本地數據庫中。 我們開始在?[從遠程倉庫中抓取與拉取](http://git-scm.com/book/zh/v2/1-git-basics/_fetching_and_pulling)?一節中介紹了此命令,然后我們在?[遠程分支](http://git-scm.com/book/zh/v2/1-git-branching/_remote_branches)?中看到了幾個使用示例。 我們在?[向一個項目貢獻](http://git-scm.com/book/zh/v2/1-distributed-git/_contributing_project)?一節中有幾個示例中也都有使用此命令。 在?[合并請求引用](http://git-scm.com/book/zh/v2/1-github/_pr_refs)?我們用它來抓取一個在默認空間之外指定的引用,在?[打包](http://git-scm.com/book/zh/v2/1-git-tools/_bundling)?中,我們了解了怎么從一個包中獲取內容。 在?[引用規格](http://git-scm.com/book/zh/v2/1-git-internals/_refspec)?章節中我們設置了高度自定義的?`refspec`?以便?`git fetch`?可以做一些跟默認不同的事情。 ## git pull `git pull`?命令基本上就是?`git fetch`?和?`git merge`?命令的組合體,Git 從你指定的遠程倉庫中抓取內容,然后馬上嘗試將其合并進你所在的分支中。 我們在?[從遠程倉庫中抓取與拉取](http://git-scm.com/book/zh/v2/1-git-basics/_fetching_and_pulling)?一節中快速介紹了此命令,然后在?[查看遠程倉庫](http://git-scm.com/book/zh/v2/1-git-basics/_inspecting_remote)?一節中了解了如果你運行此命令的話,什么將會合并。 我們也在?[用變基解決變基](http://git-scm.com/book/zh/v2/1-git-branching/_rebase_rebase)?一節中了解了如何使用此命令來來處理變基的難題。 在?[檢出沖突](http://git-scm.com/book/zh/v2/1-git-tools/_checking_out_conflicts)?一節中我們展示了使用此命令如何通過一個 URL 來一次性的拉取變更。 最后,我們在?[簽署提交](http://git-scm.com/book/zh/v2/1-git-tools/_signing_commits)?一節中我們快速的介紹了你可以使用?`--verify-signatures`?選項來驗證你正在拉取下來的經過 GPG 簽名的提交。 ## git push `git push`?命令用來與另一個倉庫通信,計算你本地數據庫與遠程倉庫的差異,然后將差異推送到另一個倉庫中。 它需要有另一個倉庫的寫權限,因此這通常是需要驗證的。 我們開始在?[推送到遠程倉庫](http://git-scm.com/book/zh/v2/1-git-basics/_pushing_remotes)?一節中介紹了?`git push`?命令。 在這一節中主要介紹了推送一個分支到遠程倉庫的基本用法。 在?[推送](http://git-scm.com/book/zh/v2/1-git-branching/_pushing_branches)?一節中,我們深入了解了如何推送指定分支,在?[跟蹤分支](http://git-scm.com/book/zh/v2/1-git-branching/_tracking_branches)?一節中我們了解了如何設置一個默認的推送的跟蹤分支。 在?[刪除遠程分支](http://git-scm.com/book/zh/v2/1-git-branching/_delete_branches)?一節中我們使用?`--delete`?標志和?`git push`?命令來在刪除一個在服務器上的分支。 在?[向一個項目貢獻](http://git-scm.com/book/zh/v2/1-distributed-git/_contributing_project)?一整節中,我們看到了幾個使用?`git push`?在多個遠程倉庫分享分支中的工作的示例。 在?[共享標簽](http://git-scm.com/book/zh/v2/1-git-basics/_sharing_tags)?一節中,我們知道了如何使用此命令加?`--tags`?選項來分享你打的標簽。 在?[發布子模塊改動](http://git-scm.com/book/zh/v2/1-git-tools/_publishing_submodules)?一節中,我們使用?`--recurse-submodules`?選項來檢查是否我們所有的子模塊的工作都已經在推送子項目之前已經推送出去了,當使用子模塊時這真的很有幫助。 在?[其它客戶端鉤子](http://git-scm.com/book/zh/v2/1-customizing-git/_other_client_hooks)?中我們簡單的提到了?`pre-push`?掛鉤(hook),它是一個可以用來設置成在一個推送完成之前運行的腳本,以檢查推送是否被允許。 最后,在?[引用規格推送](http://git-scm.com/book/zh/v2/1-git-internals/_pushing_refspecs)?一節中,我們知道了使用完整的 refspec 來推送,而不是通常使用的簡寫形式。 這對我們精確的指定要分享出去的工作很有幫助。 ## git remote `git remote`?命令是一個是你遠程倉庫記錄的管理工具。 它允許你將一個長的 URL 保存成一個簡寫的句柄,例如?`origin`?,這樣你就可以不用每次都輸入他們了。 你可以有多個這樣的句柄,`git remote`?可以用來添加,修改,及刪除它們。 此命令在?[遠程倉庫的使用](http://git-scm.com/book/zh/v2/1-git-basics/_remote_repos)?一節中做了詳細的介紹,包括列舉、添加、移除、重命名功能。 幾乎在此書的后續章節中都有使用此命令,但是一般是以?`git remote add <name> <url>`?這樣的標準格式。 ## git archive `git archive`?命令用來創建項目一個指定快照的歸檔文件。 我們在?[準備一次發布](http://git-scm.com/book/zh/v2/1-distributed-git/_preparing_release)?一節中,使用?`git archive`?命令來創建一個項目的歸檔文件用于分享。 ## git submodule `git submodule`?命令用來管理一個倉庫的其他外部倉庫。 它可以被用在庫或者其他類型的共享資源上。?`submodule`?命令有幾個子命令, 如(`add`、`update`、`sync`?等等)用來管理這些資源。 只在?[子模塊](http://git-scm.com/book/zh/v2/1-git-tools/_git_submodules)?章節中提到和詳細介紹了此命令。
                  <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>

                              哎呀哎呀视频在线观看