How to merge two git repositories with different root folder keeping history

Viewed 15

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?

0 Answers
Related