【发布时间】:2019-04-18 03:24:07
【问题描述】:
使用 git bash 创建 git 子模块时,出现以下错误
$ git submodule add https://github.com/******/my-repo/my-app
Cloning into 'D:/my-repo/my-app'...
remote: Not Found
fatal: repository 'https://github.com/*******/my-repo/my-app/' not found
fatal: clone of 'https://github.com/*******/my-repo/my-app' into submodule path 'D:/my-repo/my-app' failed
下面是我的 .git/config 文件
$ cat .git/config
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
url = https://github.com/*******/my-repo.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
我能够从 github 克隆 my-repo,但是当我在克隆后尝试添加子模块时,我看到了这个错误。我是否应该在 github 中为 my-app 子模块单独创建一个 repo,以便能够将其作为子模块添加到另一个 repo (my-repo) 中?
或者,我在这里缺少任何配置吗?
PS:我关注的是这个链接 - https://git-scm.com/book/en/v2/Git-Tools-Submodules
【问题讨论】:
标签: git github git-submodules