-1

How to merge a git repository into another repository. Note that I do not want to create a third repository with merged code neither want to add as a subdirectory. Instead, I want to merge one into the other as a combined repo.

  • 4
    Possible duplicate of [Merge git repo into branch of another repo](https://stackoverflow.com/questions/21353656/merge-git-repo-into-branch-of-another-repo) – danielorn Feb 24 '19 at 14:52

1 Answers1

0

Git repositories are a collection of graphs. You haven't told us how the two graphs relate in your case. But either way, you can simply add the one as a remote to the other, and fetch its contents. At this point you will have all commits from both repositories. Then you figure out how you want to merge the two graphs.

Jonathon Reinhart
  • 132,704
  • 33
  • 254
  • 328