How can I move a Mercurial repo into a sub-directory of an existing git repo?
fast-export and other approaches use an empty repo
How can I move a Mercurial repo into a sub-directory of an existing git repo?
fast-export and other approaches use an empty repo
Nohow
Because:
you have:
Expanding a little on my comment:
Use the hg convert
feature with the --filemap
option to modify the existing HG repo so that the folder structure looks like what you want. For instance, move everything into a subfolder called /from_hg
.
Use one of the available tools like hg-git to convert the modified hg repo to a git repo
Merge from the converted git repo into your main git repo. Now you will have subfolder /from_hg
in your git repo. Your git repo has two unrelated start points. This is quite similar to Linus Torvald's "coolest merge ever" I think.
This procedure is somewhat similar to https://stackoverflow.com/a/15223912/3195477.