i'm new so please bear with me! I had made two repos on git, lets call them FRONTEND
& BACKEND
. I didn't like that these 2 repositories, which belong to the same App/Project, should be in different git repos. So, I made a parent CMS
repository and git submodule
ed FRONTEND
& BACKEND
to it. But on GitHub, I can still see the initial repos and also the submoduled repos in the CMS
. I don't want to lose my GitHub commits. Is there a way to consolidate the repos into a single repo with multiple folders without losing the commits?
Asked
Active
Viewed 17 times
1

Adnan Khan
- 387
- 2
- 12
-
You can *create* a new repo with the shared history of both, but that will be unrelated (i.e. not compatible with) any of the 3 others. Is that what you want? – Joachim Sauer Jun 21 '20 at 20:43
-
yeah, so the magic word was `shared history`. I stumbled upon [this](https://stackoverflow.com/questions/13040958/merge-two-git-repositories-without-breaking-file-history) answer. Thank you so much for your help. Since, this is somehow a duplicate question, should I remove this? @JoachimSauer – Adnan Khan Jun 22 '20 at 09:10
-
Marking this as a duplicate might help others help the other answer as well if they phrase their search as you did, so marking this as a duplicate is preferable to just removing this question. – Joachim Sauer Jun 22 '20 at 10:03