0
首先,我的问题与 Create a submodule repository from a folder and keep its git commit history不同。将文件夹添加到已存在的git文件夹中并使其成为子模块
假设我有git文件夹,比如说~/GITA
。
我想将文件夹~/Folder1
移入其中。 (~/GITA/Folder1
)。
然后在文件夹(~/GITA/Folder1
)中,将其更改为子模块。
然后将它(子模块~/GITA/Folder1
)推送到新创建的服务器 存储库。
这是一个很好的想法,'localA-> remote-> localB'。所以没有直接的方法,比如'git submodule init; git submodule remote add'? – yuxuan
upi必须添加init和更新子模块。 3个命令,就是这样。 – CodeWizard
不好意思,“upi”的含义是什么?你说3个命令是关于前一种方式('localA-> remote-> localB')或者后面的可能方式('git submodule init; git submodule remote add')。非常感谢你 – yuxuan