0

I have to git repos: repo1, repo2. I want to move all changes from repo1 into repo2 preserving the history such that all files of repo1 appear in a specific sub-directory of repo2 root. Here is what I mean:

Current:

repo1
  |
  ...

repo2
  |
  ...

Desired:

repo2
  |
  --some_dir
  |     |
  |     repo1
  |       |
  ...     ...

Is it possible to do that preserving the history?

The solution presented in https://stackoverflow.com/a/17373088/2786156 does not really work because it moves all changes of repo1 into repo2 root.

Some Name
  • 8,555
  • 5
  • 27
  • 77
  • https://stackoverflow.com/search?q=%5Bgit%5D+merge+two+repositories+subdirectory – phd Jun 26 '20 at 11:14
  • In addition to the accepted answer see the answer https://stackoverflow.com/a/1426163/7976758 – phd Jun 26 '20 at 11:14

0 Answers0