国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > 綜合 > 正文

git clone 子模塊沒下載全的問題解決

2024-07-21 02:03:47
字體:
來源:轉載
供稿:網友

★ 1. 下載一個包含很多子模塊的工程

例如:git clone --recursive https://github.com/caffe2/caffe2

如果網絡不好或者其他原因導致子模塊沒有下載完全,這時用git pull是無法下載完全的。

注:這是在英文環境中執行的結果,英文Submodule在中文環境中翻譯為“子模組”了。 

從log中可以看出,有很多子模塊(為節省篇幅,完整log略,可以自行下載測試)。

$ git clone --recursive https://github.com/caffe2/caffe2Cloning into 'caffe2'...remote: Counting objects: 36771, done.remote: Compressing objects: 100% (12/12), done.remote: Total 36771 (delta 6), reused 7 (delta 5), pack-reused 36754Receiving objects: 100% (36771/36771), 149.13 MiB | 2.76 MiB/s, done.Resolving deltas: 100% (26926/26926), done. (這里只以子模塊protobuf為例,其他子模塊略)Submodule 'third_party/protobuf' (https://github.com/google/protobuf.git) registered for path 'third_party/protobuf'(略)Cloning into 'third_party/protobuf'...remote: Counting objects: 47717, done.remote: Compressing objects: 100% (49/49), done.remote: Total 47717 (delta 23), reused 23 (delta 5), pack-reused 47657Receiving objects: 100% (47717/47717), 40.97 MiB | 59.00 KiB/s, done.Resolving deltas: 100% (32097/32097), done.Checking connectivity... done.Submodule path 'third_party/protobuf': checked out 'a428e42072765993ff674fda72863c9f1aa2d268'(略) 

★ 2. 下載子模塊

git submodule update --init --recursive1

如果你不確定子模塊是否都已經下載完全了,也可以執行一遍這個命令確認一下。

★ 3. 參考 git clone --help

•git 2.7.4版本:

--recursive, --recurse-submodules After the clone is created, initialize all submodules within, using their default settings. This is equivalent to running git submodule update --init --recursive immediately after the clone is finished. This option is ignored if the cloned repository does not have a worktree/checkout (i.e. if any of --no-checkout/-n, --bare, or --mirror is given) 

•git 2.14.1版本:

--recurse-submodules[=<pathspec] After the clone is created, initialize and clone submodules within based on the provided pathspec. If no pathspec is provided, all submodules are initialized and cloned. Submodules are initialized and cloned using their default settings. The resulting clone has submodule.active set to the provided pathspec, or "." (meaning all submodules) if no pathspec is provided. This is equivalent to running git submodule update --init --recursive immediately after the clone is finished. This option is ignored if the cloned repository does not have a worktree/checkout (i.e. if any of --no-checkout/-n, --bare, or --mirror is given)

 到此這篇關于git clone 子模塊沒下載全的問題解決的文章就介紹到這了,更多相關git clone 子模塊沒下載全內容請搜索武林網以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持武林網!

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 奉化市| 巢湖市| 翁牛特旗| 合阳县| 集贤县| 炎陵县| 忻州市| 山阳县| 南康市| 天气| 依安县| 安新县| 安乡县| 潼关县| 阿拉善左旗| 阿荣旗| 澎湖县| 龙游县| 宁远县| 东安县| 肇东市| 凌源市| 建瓯市| 定远县| 尼木县| 宁蒗| 文成县| 三台县| 诏安县| 丹凤县| 策勒县| 桦甸市| 凤凰县| 子长县| 潼关县| 利辛县| 什邡市| 板桥市| 漳浦县| 怀化市| 惠州市|