There is no automatic way to do this, because the result only depends on what you want and a tool wouldn’t know how to make that choice.
A merge is the return of a code change when you have a branch, i.e., you initially made a copy of the code. In this case you don’t have a branch, the projects are different, and you want to unite them for any convenience, for example, architecture.
Then, manually, you will choose and move the necessary files. This if your projects are complementary.
Already in case they have been projects "mirror", for some reason, or simply, you are now organizing and saw that some things can be better if you want to move a Function or class, the technique for this is Refactoring, or Code refactoring. This technique also applies in some way to the first case.
Refactoring is basically the process of you tidying up the code or improving it, and for that it is good that you have automated tests.
Tools that have actions like: move class to another namespace, or move class for another project, move Function of a class to another, ...:
To learn more about the subject, and other important interconnected, I recommend reading the books:
https://martinfowler.com/books/refactoring.html
If both projects have the same files, a merge tool should help you. Like Winmerge or Kdiff3.
– rogerdossantos
It would not be the case to commit the local versions in the source repository?
– Leandro Angelo
I used Winmerge and solved here, some things were manual even, but Winmerge saved me a good time. Thank you all
– Marcelo Wagner