Everybody understands something different by "merge git repositories", so here is my case. We had a TFS repository and we have checked out the sources at one point in time and made an initial git commit. Then we did normal development in git (branching, merging, etc.). The problem is that in the new repository we do not have history in out git repository and we would like to fix that. Therefore I have converted whole TFS repository to git repository and now I need to merge the converted TFS repository with the current git repository.
As becomes obvious from the above description the repositories are independent from git standpoint, but from logical point of view they have one commit in common (the commit that became initial commit to current git repository).
How do I merge those repos without losing history of any of them? I could just take the converted TFS repo as base and then cherry pick changes from master of the current repo, but that would not import all the branches that were created in the current repo.