当我开始使用 GIT 时,我对项目代码并不熟悉,只想将所有代码置于源代码控制之下。项目层次结构是这样的:
/Projects/.git # I put the git repository here, which I think was a big mistake.
/Projects/Project1
/Projects/Project2
/Projects/Project3
/Projects/Project4
/Projects/Project5
有一次我最终创建了一个子存储库:
/Projects/.git (now it contains all of /Projects/Project3/.git changes too)
/Projects/Project1
/Projects/Project2
/Projects/Project3
/Projects/Project3/.git # I think this will compound the problem of seperation
/Projects/Project4
/Projects/Project5
我真正想要的是这样做:
/Projects/(no .git here)
/Projects/Project1/.git
/Projects/Project2/.git
/Projects/Project3/.git
/Projects/Project3/.git
/Projects/Project4/.git
/Projects/Project5/.git
我查看了过滤器分支,但并不真正了解如何使用它将历史从较高的 /Projects/.git 存储库中提取到单独的较低的 /Projects/Project[1-5]/.git 存储库中.
我一直在环顾四周,发现有一个新的 git 子模块工具。我想知道这是否是我应该尝试使用的,但我不确定。
有谁知道如何将这些项目分成单独的存储库,以便我可以摆脱覆盖整个项目集的上层存储库?
任何帮助,将不胜感激。
艾伦