相关疑难解决方法(0)

组合多个git存储库

假设我的设置看起来很像

phd/code/
phd/figures/
phd/thesis/
Run Code Online (Sandbox Code Playgroud)

由于历史原因,这些都有自己的git存储库.但我想将它们合并为一个,以简化一些事情.例如,现在我可能会进行两组更改,并且必须执行类似的操作

cd phd/code
git commit 
cd ../figures
git commit
Run Code Online (Sandbox Code Playgroud)

表演(现在)很棒

cd phd
git commit
Run Code Online (Sandbox Code Playgroud)

似乎有几种方法可以使用子模块或从我的子存储库中提取,但这比我正在寻找的要复杂一些.至少,我很高兴

cd phd
git init
git add [[everything that's already in my other repositories]]
Run Code Online (Sandbox Code Playgroud)

但这似乎不是一个单行.有什么git可以帮助我吗?

git

203
推荐指数
8
解决办法
7万
查看次数

标签 统计

git ×1