我已經捆綁了一個 repo 并將 repo.bundle 檔案存盤在我的檔案系統上。我需要從這個包中克隆為另一個 repo 中的子模塊,該 repo 當前有一個帶有遠程 url 的 .gitmodules 檔案。為了從系統本地存盤的 git 包中克隆,我對 .gitmodules 檔案進行了以下更改:
[submodule "myrepo_path/submodule_path"]
path = myrepo_path/submodule_path
url = file:///home/myuser/MY-BUNDLES/repo.bundle
fetch = refs/heads/*:refs/remotes/origin/*
ignore = all
但是,當我執行 git submodule init 時,克隆失敗并出現以下錯誤:
$ git submodule update --init
Cloning into '/home/myuser/Desktop/Repos/myrepo_path/submodule_path'...
fatal: too large to be a .git file: '/home/myuser/MY-BUNDLES/repo.bundle'
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
捆綁包是一個 1.9G 檔案。我想知道是否可以以上述方式初始化我的子模塊?或者對我來說唯一的選擇是使用git clone命令從 git 包中顯式克隆
uj5u.com熱心網友回復:
我可以通過更改 .gitmodules 檔案中的 url 使其作業。代替
url = file:///home/myuser/MY-BUNDLES/repo.bundle
使用以下(擺脫file):
url = /home/myuser/MY-BUNDLES/repo.bundle
現在使用 git 克隆子模塊 submodule update --init
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/405539.html
標籤:
上一篇:Git拒絕LFS覆寫
