pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

<small id='l2geG'></small><noframes id='l2geG'>

      <i id='l2geG'><tr id='l2geG'><dt id='l2geG'><q id='l2geG'><span id='l2geG'><b id='l2geG'><form id='l2geG'><ins id='l2geG'></ins><ul id='l2geG'></ul><sub id='l2geG'></sub></form><legend id='l2geG'></legend><bdo id='l2geG'><pre id='l2geG'><center id='l2geG'></center></pre></bdo></b><th id='l2geG'></th></span></q></dt></tr></i><div class="sy60ss2" id='l2geG'><tfoot id='l2geG'></tfoot><dl id='l2geG'><fieldset id='l2geG'></fieldset></dl></div>

      <tfoot id='l2geG'></tfoot>

      • <bdo id='l2geG'></bdo><ul id='l2geG'></ul>
      <legend id='l2geG'><style id='l2geG'><dir id='l2geG'><q id='l2geG'></q></dir></style></legend>
      1. git 子模塊 svn 外部

        git submodule svn external(git 子模塊 svn 外部)
          <tbody id='TD4mV'></tbody>
        <i id='TD4mV'><tr id='TD4mV'><dt id='TD4mV'><q id='TD4mV'><span id='TD4mV'><b id='TD4mV'><form id='TD4mV'><ins id='TD4mV'></ins><ul id='TD4mV'></ul><sub id='TD4mV'></sub></form><legend id='TD4mV'></legend><bdo id='TD4mV'><pre id='TD4mV'><center id='TD4mV'></center></pre></bdo></b><th id='TD4mV'></th></span></q></dt></tr></i><div class="0gg2eao" id='TD4mV'><tfoot id='TD4mV'></tfoot><dl id='TD4mV'><fieldset id='TD4mV'></fieldset></dl></div>

        • <tfoot id='TD4mV'></tfoot>

                <bdo id='TD4mV'></bdo><ul id='TD4mV'></ul>
              • <legend id='TD4mV'><style id='TD4mV'><dir id='TD4mV'><q id='TD4mV'></q></dir></style></legend>

                <small id='TD4mV'></small><noframes id='TD4mV'>

                1. 本文介紹了git 子模塊 svn 外部的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時(shí)送ChatGPT賬號(hào)..

                  假設(shè)我有 3 個(gè) git 存儲(chǔ)庫,每個(gè)存儲(chǔ)庫在根目錄中都有一個(gè) libtests 文件夾.所有 3 個(gè)存儲(chǔ)庫都是我希望成為單個(gè)包的一部分,但是將存儲(chǔ)庫分開對(duì)我來說很重要.

                  Let's say I have 3 git repositories, each with a lib and tests folder in the root. All 3 repositories are part of what I want to be a single package, however it is important to me to keep the repositories separate.

                  我是來自 svn 的 git 新手,所以我一直在閱讀 submodules 以及它們與 svn:externals 的區(qū)別.在 SVN 中,我可以有一個(gè)

                  I am new to git coming from svn, so I have been reading up on submodules and how they differ from svn:externals. In SVN I could have a single

                  lib/vendor/package
                  

                  目錄,在 package 內(nèi)部,我可以設(shè)置 3 個(gè)外部文件,指向我的 3 個(gè)存儲(chǔ)庫中的每一個(gè) lib 目錄,將其適當(dāng)重命名為

                  directory, and inside package I could setup 3 externals pointing to each of my 3 repositories lib directory, renaming it appropriately like

                  lib/vendor/package/a  -> repo1/lib
                  lib/vendor/package/b  -> repo2/lib
                  lib/vendor/package/c  -> repo3/lib
                  

                  但據(jù)我所知,這在 git 中是不可能的.我錯(cuò)過了什么嗎?

                  but from my understanding this is not possible with git. Am I missing something?

                  我真的希望這可以通過兩種方式之一解決.

                  Really I'm hoping this can be solved in one of two ways.

                  1. 有人會(huì)指出如何創(chuàng)建第 4 個(gè) git 存儲(chǔ)庫,該存儲(chǔ)庫將其他 3 個(gè)作為子模塊組織起來,如我上面提到的(我可以在其中擁有 ab, 和 c 文件夾內(nèi)的根目錄)
                  2. 有人會(huì)指出如何使用 svn:externals 結(jié)合 githubs svn 支持進(jìn)行設(shè)置,引用每個(gè) git 存儲(chǔ)庫中的 lib 目錄(根據(jù)我的理解不可能)
                  1. Someone will point out how to create a 4th git repository which has the other 3 as submodules organized as I have mentioned above (where I can have an a, b, and c folder inside the root)
                  2. Someone will point out how to set this up using svn:externals in combination with githubs svn support, referencing the lib directory within each git repository (from my understanding this is impossible)

                  更新:

                  我實(shí)際上曾嘗試按照您鏈接的子模塊教程進(jìn)行操作,但遇到了以下問題.

                  Update:

                  I had actually tried to follow the submodules tutorial you linked to, but I run into the following problem.

                  做如上圖所示的事情,而不是像這樣的映射

                  Doing things as shown above, instead of a mapping like

                  lib/vendor/package/a  -> repo1/lib
                  lib/vendor/package/b  -> repo2/lib
                  lib/vendor/package/c  -> repo3/lib
                  

                  我留下了

                  lib/vendor/package/a  -> repo1
                  lib/vendor/package/b  -> repo2
                  lib/vendor/package/c  -> repo3
                  

                  這并不理想,因?yàn)楝F(xiàn)在訪問repo1lib文件夾中的ClassA,路徑是

                  this is not ideal since now to access ClassA inside repo1's lib folder, the path is

                  lib/vendor/package/a/lib/ClassA
                  

                  當(dāng)我真的想得到(這可以通過 svn:externals 實(shí)現(xiàn))

                  when I'm really trying to get (and this is possible with svn:externals)

                  lib/vendor/package/a/ClassA
                  

                  因?yàn)樯厦娴?code>a實(shí)際上是repo1/lib,而不是repo1的根目錄.

                  since a above is actually repo1/lib, and not the root directory of repo1.

                  這樣的事情很重要,因?yàn)橐?PHP5.3 為例,使用 SplClassLoader ( http://gist.github.com/221634 ),它需要一個(gè)命名空間到目錄的映射,如

                  Something like this is important since, with PHP5.3 for example, using the SplClassLoader ( http://gist.github.com/221634 ), it requires a namespace-to-directory mapping like

                  PackageaClassA  -> lib/vendor/package/a/ClassA
                  

                  這是我概念性誤解的地方,如何設(shè)置第 4 個(gè) git 存儲(chǔ)庫以允許我的目錄映射如上.

                  this is where my conceptual misunderstanding is, how to setup that 4th git repository to allow my directory mappings like above.

                  推薦答案

                  你說得對(duì),Git 子模塊不能直接做你想做的事.它在 SVN 中工作,因?yàn)榇鎯?chǔ)庫的根、分支及其任何子目錄都是同一種對(duì)象.在 Git 中,存儲(chǔ)庫、分支和目錄都是不同類型的對(duì)象(您不能將目錄用作完整存儲(chǔ)庫或分支).

                  You are right, Git submodules can not directly do exactly what you want. It works in SVN because the root of a repository, branches, and any subdirectory thereof are the same kind of object. In Git, a repository, a branch, and a directory are all distinct kinds of objects (you can not use a directory as a full repository or as a branch).

                  不過,有幾種間接方法可以實(shí)現(xiàn)您的愿望.

                  There are a couple of indirect ways to accomplish what you want though.

                  Git 子模塊的核心是超級(jí)項(xiàng)目"的工作樹中另一個(gè)存儲(chǔ)庫的克隆*.Git 只克隆完整的存儲(chǔ)庫.不可能從現(xiàn)有存儲(chǔ)庫中只克隆一個(gè)子目錄?.

                  The core of a Git submodule is a clone of another repository in the work tree of the "superproject"*. Git only clones full repositories. It is not possible to clone just a single subdirectory out of an existing repository?.

                  * 普通子模塊還需要在超級(jí)項(xiàng)目的提交/索引和(通常)超級(jí)項(xiàng)目的 .gitmodules 文件中的一個(gè)特殊引用.在不相關(guān)的工作樹中可能有其他存儲(chǔ)庫的非跟蹤克隆,但這種用法不會(huì)創(chuàng)建子模塊.
                  ? Git 1.7.0 及更高版本具有稀疏檢出"功能,但將 lib 目錄重新定位到每個(gè)子模塊克隆的頂級(jí)目錄無濟(jì)于事.

                  * Normal submodules also require a special reference in the superproject's commits/index and (normally) an entry in the superproject's .gitmodules file. It is possible to have non-tracked clones of other repositories in an unrelated working tree, but such usage does not create a submodule.
                  ? Git 1.7.0 and later has a "sparse checkout" feature, but it would not help to relocate the lib directory the top level of each submodule clone.

                  然而,您可能能夠使用 Git 對(duì)符號(hào)鏈接的支持來做一些相當(dāng)接近的事情:

                  You might, however be able to use Git's support for symbolic links to do something that is fairly close:

                  #
                  # Make the lib directory of each submodule appear in the superproject as
                  # lib/vendor/packages/$submod_name
                  #
                  # With this structure in each of the submodules (a, b, c):
                  #
                  #    lib/
                  #    tests/
                  #
                  # We end up with this structure in the superproject:
                  #
                  #    lib/
                  #        vendor/
                  #            packages/
                  #                a     (a symlink to ../../../_submodules/a/lib)
                  #                b     (a symlink to ../../../_submodules/b/lib)
                  #                c     (a symlink to ../../../_submodules/c/lib)
                  #    _submodules
                  #        a/            (a Git submodule)
                  #            lib/
                  #            tests/
                  #        b/            (a Git submodule)
                  #            lib/
                  #            tests/
                  #        c/            (a Git submodule)
                  #            lib/
                  #            tests/
                  #
                  add_one() {
                      dir=lib/vendor/package
                      dest="$dir/$1"
                      # use fewer ".."s to put the _submodules closer to the symlinks
                      s=../../../_submodules/"$1"
                      git submodule add "$2" "$dir/$s"
                      ln -s "$s"/lib "$dest"
                      git add "$dest"
                  }
                  
                  cd "$main_repo_toplevel"
                  mkdir -p lib/vendor/package
                  add_one a git@githost.example.com:user/package-a.git
                  add_one b git://public.example.com/work/package-b-dev.git
                  add_one c ssh://special.example.com/foo.git
                  

                  使用git子樹

                  apenwarr 的 git subtree 可以拆分和合并部分存儲(chǔ)庫(即單個(gè)子目錄;它是 子樹合并" 與其他不錯(cuò)的功能).第一步是提取每個(gè)子項(xiàng)目中 lib 的歷史記錄.然后,要么直接使用提取的歷史作為子模塊,要么使用 git subtree 將子樹合并到您的主存儲(chǔ)庫中.無論哪種方式,這都會(huì)引入一個(gè)額外的步驟(重新提取 lib 歷史記錄),然后才能將子項(xiàng)目的更改集成到主存儲(chǔ)庫中.

                  Using git subtree

                  apenwarr's git subtree can split off and merge parts of repositories (i.e. individual subdirectories; it is a wrapper around "subtree merging" with other nice features). The first step would be to extract the history of lib in each of your sub-projects. Then, either directly use the extracted history as a submodule, or use git subtree to do a subtree merge into your main repository. Either way, this would introduce an extra step (re-extracting the lib history) before you could integrate changes from a sub-project into your main repository.

                  這篇關(guān)于git 子模塊 svn 外部的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  enable SOAP on PHP(在 PHP 上啟用 SOAP)
                  Get received XML from PHP SOAP Server(從 PHP SOAP 服務(wù)器獲取接收到的 XML)
                  not a valid AllXsd value(不是有效的 AllXsd 值)
                  PHP SoapClient: SoapFault exception Could not connect to host(PHP SoapClient:SoapFault 異常無法連接到主機(jī))
                  Implementation of P_SHA1 algorithm in PHP(PHP中P_SHA1算法的實(shí)現(xiàn))
                  Sending a byte array from PHP to WCF(將字節(jié)數(shù)組從 PHP 發(fā)送到 WCF)
                  • <tfoot id='zhmMf'></tfoot>

                          <i id='zhmMf'><tr id='zhmMf'><dt id='zhmMf'><q id='zhmMf'><span id='zhmMf'><b id='zhmMf'><form id='zhmMf'><ins id='zhmMf'></ins><ul id='zhmMf'></ul><sub id='zhmMf'></sub></form><legend id='zhmMf'></legend><bdo id='zhmMf'><pre id='zhmMf'><center id='zhmMf'></center></pre></bdo></b><th id='zhmMf'></th></span></q></dt></tr></i><div class="om0e0os" id='zhmMf'><tfoot id='zhmMf'></tfoot><dl id='zhmMf'><fieldset id='zhmMf'></fieldset></dl></div>
                            <tbody id='zhmMf'></tbody>

                            <bdo id='zhmMf'></bdo><ul id='zhmMf'></ul>
                            <legend id='zhmMf'><style id='zhmMf'><dir id='zhmMf'><q id='zhmMf'></q></dir></style></legend>

                            <small id='zhmMf'></small><noframes id='zhmMf'>

                          • 主站蜘蛛池模板: 振动筛,震动筛,圆形振动筛,振动筛价格,振动筛厂家-新乡巨宝机电 蒸汽热收缩机_蒸汽发生器_塑封机_包膜机_封切收缩机_热收缩包装机_真空机_全自动打包机_捆扎机_封箱机-东莞市中堡智能科技有限公司 | 双效节能浓缩器-热回流提取浓缩机组-温州市利宏机械 | 云阳人才网_云阳招聘网_云阳人才市场_云阳人事人才网_云阳人家招聘网_云阳最新招聘信息 | 根系分析仪,大米外观品质检测仪,考种仪,藻类鉴定计数仪,叶面积仪,菌落计数仪,抑菌圈测量仪,抗生素效价测定仪,植物表型仪,冠层分析仪-杭州万深检测仪器网 | 恒温恒湿试验箱_高低温试验箱_恒温恒湿箱-东莞市高天试验设备有限公司 | 不锈钢水管-不锈钢燃气管-卫生级不锈钢管件-不锈钢食品级水管-广东双兴新材料集团有限公司 | ASA膜,ASA共挤料,篷布色母料-青岛未来化学有限公司 | atcc网站,sigma试剂价格,肿瘤细胞现货,人结肠癌细胞株购买-南京科佰生物 | 企典软件一站式企业管理平台,可私有、本地化部署!在线CRM客户关系管理系统|移动办公OA管理系统|HR人事管理系统|人力 | 桁架机器人_桁架机械手_上下料机械手_数控车床机械手-苏州清智科技装备制造有限公司 | 户外健身路径_小区健身器材_室外健身器材厂家_价格-浩然体育 | 深圳激光打标机_激光打标机_激光焊接机_激光切割机_同体激光打标机-深圳市创想激光科技有限公司 深圳快餐店设计-餐饮设计公司-餐饮空间品牌全案设计-深圳市勤蜂装饰工程 | 透平油真空滤油机-变压器油板框滤油机-滤油车-华之源过滤设备 | 烟气换热器_GGH烟气换热器_空气预热器_高温气气换热器-青岛康景辉 | 【北京写字楼出租_写字楼租赁_办公室出租网/出售】-远行地产官网 | 天然鹅卵石滤料厂家-锰砂滤料-石英砂滤料-巩义东枫净水 | 中空玻璃生产线,玻璃加工设备,全自动封胶线,铝条折弯机,双组份打胶机,丁基胶/卧式/立式全自动涂布机,玻璃设备-山东昌盛数控设备有限公司 | 承插管件_不锈钢承插管件_锻钢高压管件-温州科正阀门管件有限公司 | 气象监测系统_气象传感器_微型气象仪_气象环境监测仪-山东风途物联网 | 电池高低温试验箱-气态冲击箱-双层电池防爆箱|简户百科 | 变位机,焊接变位机,焊接变位器,小型变位机,小型焊接变位机-济南上弘机电设备有限公司 | 土壤水分自动监测站-SM150便携式土壤水分仪-铭奥仪器 | 抖音短视频运营_企业网站建设_网络推广_全网自媒体营销-东莞市凌天信息科技有限公司 | 超细|超微气流粉碎机|气流磨|气流分级机|粉体改性机|磨粉机|粉碎设备-山东埃尔派粉体科技 | 紧急泄压人孔_防爆阻火器_阻火呼吸阀[河北宏泽石化] | 12cr1mov无缝钢管切割-15crmog无缝钢管切割-40cr无缝钢管切割-42crmo无缝钢管切割-Q345B无缝钢管切割-45#无缝钢管切割 - 聊城宽达钢管有限公司 | 萃取箱-萃取槽-PVC萃取箱厂家-混合澄清槽- 杭州南方化工设备 | 滁州高低温冲击试验箱厂家_安徽高低温试验箱价格|安徽希尔伯特 | 吸污车_吸粪车_抽粪车_电动三轮吸粪车_真空吸污车_高压清洗吸污车-远大汽车制造有限公司 | 商标转让-购买商标专业|放心的商标交易网-蜀易标商标网 | 磁力反应釜,高压釜,实验室反应釜,高温高压反应釜-威海自控反应釜有限公司 | 南方珠江-南方一线电缆-南方珠江科技电缆-南方珠江科技有限公司 南汇8424西瓜_南汇玉菇甜瓜-南汇水蜜桃价格 | 光泽度计_测量显微镜_苏州压力仪_苏州扭力板手维修-苏州日升精密仪器有限公司 | 扬子叉车厂家_升降平台_电动搬运车|堆高车-扬子仓储叉车官网 | 蓝米云-专注于高性价比香港/美国VPS云服务器及海外公益型免费虚拟主机 | 环氧乙烷灭菌器_压力蒸汽灭菌器_低温等离子过氧化氢灭菌器 _低温蒸汽甲醛灭菌器_清洗工作站_医用干燥柜_灭菌耗材-环氧乙烷灭菌器_脉动真空压力蒸汽灭菌器_低温等离子灭菌设备_河南省三强医疗器械有限责任公司 | 游泳池设备安装工程_恒温泳池设备_儿童游泳池设备厂家_游泳池水处理设备-东莞市君达泳池设备有限公司 | AR开发公司_AR增强现实_AR工业_AR巡检|上海集英科技 | 喷播机厂家_二手喷播机租赁_水泥浆洒布机-河南青山绿水机电设备有限公司 | 模具硅橡胶,人体硅胶,移印硅胶浆厂家-宏图硅胶科技 | 拉力机-拉力试验机-万能试验机-电子拉力机-拉伸试验机-剥离强度试验机-苏州皖仪实验仪器有限公司 |