1

Apologies if the title of my question doesn't quite make sense. I'm trying to avoid words that are overloaded like "how do I merge two git repos".

Here's a more elaborate description of my question:

I'm working on a project that is several years old; however the current git repo only has a few months of history. The first commit was a large one which effectively committed a full git archive of the previous repository.

I'd like to try to recombine these different git repositories and salvage as much of the project's history as possible; is there a tool, or a tutorial, that could help me with the process?

Here's a quick diagram to help further

oldRepo

    * Commit 1 - added file A
    * Commit 2 - edited file A
    * Commit 3 - added file B
    * Commit 4 - edited file B

newRepo

    * Commit 1 - added all contents from oldRepo at Commit 4
    * Commit 2 - added file C
    * Commit 3 - edited file C

combined Repo

    * Commit 1 - (from oldRepo) - added file A
    * Commit 2 - (from oldRepo) - edited file A
    * Commit 3 - (from oldRepo) - added file B
    * Commit 4 - (from oldRepo) - edited file B
    * Commit 5 - (from newRepo) - added file C
    * Commit 6 - (from newRepo) - edited file C
STW
  • 44,917
  • 17
  • 105
  • 161
  • 1
    See this question: sounds like what you are trying to do: http://stackoverflow.com/questions/1425892/how-do-you-merge-two-git-repositories – codewario Jan 08 '14 at 15:16
  • That looks close, but is most geared to bring two different projects into a single repository. I'll try what was outlined here http://stackoverflow.com/a/8188110/60724 as it seems to match my case – STW Jan 08 '14 at 16:45

0 Answers0