I have the following situation:
I have an old git repo, that I at one point abandoned because I started using Bazaar instead, mainly because I wanted to use LaunchPad. At the time, it was not possible to convert the original git repo to bzr format, so I simply started a new bzr repo based on the last git commit.
Now, years later, I have reversed my decision, and I want to go back to git. I have converted my bzr repo to git, but now I'd like to stack the new repo on the old one, so I have the entire 10+ years of history for the project. The first commit in the "new" repo is very similar to the last commit in the "old" repo.
I have researched how to merge git repositories, but the cases people describe are mostly merging subtrees. That is not what I want. I merely want to stack the "new" repo on top of the "old" repo.
I suppose it is possible to manually extract every commit in the "new" repo and committing them on the "old" repo, preserving the date and commit message, but I am wondering if there's a smarter way to do it.
You can do this sort of grafting with the
replace
command. From the Git book: