我们先修改当前repo的submodules为ssh,然后init submodules,成功了则表明,只有一级submodules;如果发现有https repo无法clone,则说明有二级甚至三级submodules,那么我们在使用sed批量修改即可,最后在init submodules,搞定。众所周知onnxruntime是有巨多submodules,并且不止一级。我们就以
--branch <name>选项:“新生成的本地仓库的HEAD不指向远程仓库中HEAD指向的分支,而是将新生成的本地仓库的HEAD指向指定的 <name>分支”。HEAD是用于标识仓库的当前所在分支的,对于git clone而言,在创建完远程追踪分支后,需要创建本地的初始化分支,该初始化分支复制于远程仓库的当前分支,因此需要知道远程仓库中的当前...
clone.defaultRemoteName 克隆仓库时要创建的远程名称。默认为origin,并且可以通过传递--origin命令行选项给git-clone[1]进行覆盖。 clone.rejectShallow 拒绝克隆浅仓库;可以通过在命令行上使用--reject-shallow选项来覆盖此设置。参见git-clone[1]。 clone.filterSubmodules 如果提供了部分克隆过滤器(参见git-rev-list...
Create ashallowclone with a history truncated to the specified number of commits. Implies--single-branchunless--no-single-branchis given to fetch the histories near the tips of all branches. If you want to clone submodules shallowly, also pass--shallow-submodules. ...
Create ashallowclone with a history truncated to the specified number of commits. Implies--single-branchunless--no-single-branchis given to fetch the histories near the tips of all branches. If you want to clone submodules shallowly, also pass--shallow-submodules. ...
Create ashallowclone with a history truncated to the specified number of commits. Implies--single-branchunless--no-single-branchis given to fetch the histories near the tips of all branches. If you want to clone submodules shallowly, also pass--shallow-submodules. ...
在git-submodule脚本中,可以看到很多直接使用160000来判断文件是否是外部link的逻辑。例如 repo=$1 sm_path=$2 if test -z "$sm_path"; then sm_path=$(printf '%s\n' "$repo" | sed -e 's|/$||' -e 's|:*/*\.git$||' -e 's|.*[/:]||g') ...
git clone [repository]Copy The output of thegit clonecommand confirms the successful cloning. The directory with the cloned repository contains all the files and subdirectories of the original repository. However, the submodule directories are created empty and uninitialized. ...
$ git clone-bmaster2../server. 表示克隆名为master2的这个分支,如果省略-b<name>表示克隆master分支。 --upload-pack <upload-pack> -u <upload-pack> When given, and the repository to clone from is accessed via ssh, this specifies a non-default path for the command run on the other end. ...
Thegit submodule addcommand takes a URL parameter that points to a git repository. Here we have added theawesomelibraryas a submodule. Git will immediately clone the submodule. We can now review the current state of the repository usinggit status... ...