【发布时间】:2017-06-06 22:21:27
【问题描述】:
我尝试使用相对 url 添加子树:
> git subtree add --prefix child ../child.git master --squash
git fetch ../child.git master
fatal: '../child.git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
但是../child.git,相对于这个存储库的远程,是一个我拥有完全权限的 git 存储库。如果我尝试将其添加为子模块,您会看到这一点:
> git submodule add ../child.git child
Cloning into 'D:/code/jjj/subtree/parent/child'...
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
如果我使用绝对 URL,我可以将此子存储库添加为子树,如果我使用相对 URL,我可以将其添加为子模块。
我是否可以使用相对 URL 将其添加为 子树?
【问题讨论】:
标签: git git-subtree