<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、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # 6.2.1\. 用SVN操作GitHub 2008年4月1日,GitHub宣布推出基于SVN的SVNHub網站,后證實這是一個愚人節玩笑[[1]](https://github.com/blog/31-back-to-subversion)。2010年愚人節,類似消息再起,可這一次不再是玩笑[[2]](https://github.com/blog/626-announcing-svn-support)。即對于GitHub上的每一個Git版本庫,現在都可以用SVN命令進行操作。更酷的是 SVN 版本庫使用的是和 Git 版本庫同樣的地址[[3]](https://github.com/blog/966-improved-subversion-client-support)。 例如用下面的 Git 命令訪問本書的 Git 版本庫,顯示版本庫包含的引用。其中分支master用于維護書稿,分支gh-pages保存書稿編譯后的 HTML 網頁用于在 GitHub 上顯示。 ``` $ git ls-remote --heads https://github.com/gotgit/gotgithub ce5d3dda9b9ce8ec90def1da10181a094bea152f refs/heads/gh-pages c4d370b1b0bafb103de14e104ca18b8c31d80add refs/heads/master ``` 如果使用 SVN 命令訪問相同的版本庫地址,Git 服務器變身為一個 SVN 服務器,將Git的引用對應為 SVN 風格的分支。如下: ``` $ svn ls https://github.com/gotgit/gotgithub branches/ trunk/ $ svn ls https://github.com/gotgit/gotgithub/branches gh-pages/ ``` SVN 支持部分檢出,下面命令將整個主線trunk(相當于 Git 版本庫的master分支)檢出。 ``` $ svn checkout https://github.com/gotgit/gotgithub/trunk gotgithub A gotgithub/Makefile A gotgithub/README.rst ... Checked out revision 30. ``` 還可以使用 SVN 命令創建分支,即相當于在 Git 版本庫中創建新的引用。測試發現GitHub 尚不支持 SVN 遠程拷貝創建分支,需要通過本地拷貝再提交的方式創建新分支。操作如下: 1. 為避免檢出版本庫所有分支過于耗時,在檢出時使用--depth=empty參數。 ``` $ svn checkout --depth=empty \ https://github.com/gotgit/gotgithub gotgithub-branches Checked out revision 30. ``` 1. 進入到檢出目錄中,更新出trunk和branches兩個頂級目錄。 ``` $ cd gotgithub-branches $ svn up --depth=empty trunk branches A trunk Updated to revision 30. A branches Updated to revision 30. ``` 1. 通過拷貝從主線trunk創建分支branches/svn-github。 ``` $ svn cp trunk branches/svn-github A branches/svn-github $ svn st A + branches/svn-github ``` 1. 提交完成分支創建。 ``` $ svn ci -m "create branch svn-github from trunk" Authentication realm: <https://github.com:443> GitHub Username: gotgithub Password for 'gotgithub': Adding branches/svn-github Committed revision 31. ``` 1. 用 Git 命令可以看到服務器上創建了一個新的同名引用,并且指向和master一致。 ``` $ git ls-remote --heads https://github.com/gotgit/gotgithub ce5d3dda9b9ce8ec90def1da10181a094bea152f refs/heads/gh-pages c4d370b1b0bafb103de14e104ca18b8c31d80add refs/heads/master c4d370b1b0bafb103de14e104ca18b8c31d80add refs/heads/svn-github ``` 下面嘗試一下用 SVN 命令在新創建的分支svn-github中提交。 1. 進入到之前檢出完整主線trunk的gotgithub目錄,并將工作區切換為分支branches/svn-github。 ``` $ cd ../gotgithub $ svn switch https://github.com/gotgit/gotgithub/branches/svn-github At revision 31. ``` 1. 修改文件,查看工作區狀態。 ``` $ svn st M 06-side-projects/040-svn.rst ``` 1. 用 SVN 提交。 ``` $ svn ci -m "GitHub svn client support improved. Refs: http://git.io/svn" Sending 06-side-projects/040-svn.rst Transmitting file data . Committed revision 32. ``` 1. 同樣查看 Git 版本庫的更新,會發現svn-github分支的指向已和master不同。 ``` $ git ls-remote --heads https://github.com/gotgit/gotgithub ce5d3dda9b9ce8ec90def1da10181a094bea152f refs/heads/gh-pages c4d370b1b0bafb103de14e104ca18b8c31d80add refs/heads/master 64b80cb5331e28fdfb896e2ab3085779bf6ca019 refs/heads/svn-github ```
                  <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>

                              哎呀哎呀视频在线观看