0

I'd like to merge two Git repositories:

  1. Repo1: Root/A/Subfolders
  2. with Repo2: Root/Subfolders

Historically Repo2 originated from Repo1 but during creation has been "shallowed" by the folder A. Now I need to merge Repo2 back to Repo1 keeping history, but as far as I know cannot simply add Repo2 as remote in Repo1, due to the slightly different structure. Only the history of Repo1 is crucial to me, Repo2 is much "younger".

Is there an easy solution to the problem?

Marcin
  • 1
  • 1
  • Do they share any history at all? There are ways to create a single history from two repositories using subtrees but it is much easier if they have shared commits. – Simon Doppler Sep 13 '22 at 15:13
  • No, they don't share any commit history – Marcin Sep 13 '22 at 15:15
  • Sure, it's possible. I answered a question pretty much like this one recently.... let me see..... https://stackoverflow.com/a/73657282/2437508 – eftshift0 Sep 13 '22 at 15:20

0 Answers0