Move files from one repository to another

Assistance reqd with GitHub.

Use case is to move files from 1 repo to another but within subfolder of the other repo…and history needs to be retained for the files. What is the right/best way to achieve that?
Note that it may not be possible to move content directly to the new repo first and then move the content to subfolder…since destination repo has some similarly named files…so direct move could cause other types of issues like merge conflicts, etc.

Example:
Repo1 contains /src/build.gradle
Repo2 contains /src/build.gradle
Final outcome desired is that Repo1 contains /src/build.gradle and /repo2/src/build.gradle (along with its previous history).
Something like that…

Please give me some suggestions

:wave: Welcome!

It sounds like “submodules” might do what you need this to do?

Some more here: Git - Submodules

And a blog post explaining how it will appear on GitHub: Working with submodules - The GitHub Blog