The short story is that I have two git repositories, one a fork of the other, where the fork's history has been rewritten. I need to merge the fork back, but that seems to be tricky.
As an example, suppose I have a repository named foo
. The commit history looks like the following:
Commit 3: Typo fixes
Commit 2: Some feature
Commit 1: Quick bug fixes
Commit 0: Initial commit
foo
is then forked as bar
, and then a process is used to rewrite / remove history, so that bar
's history
looks like the following:
Commit C: Type fixes
Commit B: Some feature
Commit A: Quick bug fixes
At this point, commit IDs have changed, and Commit 0 no longer exists in the fork. Everything else is the same.
Now, time has passed. Both repositories have had work done to them by many people. So we might have something like:
foo bar
----------------------------------|-------------------------------------
Commit 5: Fix the major bug fix |
Commit 4: Major bug fix | Commit D: Project specific fixes
Commit 3: Typo fixes | Commit C: Type fixes
Commit 2: Some feature | Commit B: Some feature
Commit 1: Quick bug fixes | Commit A: Quick bug fixes
Commit 0: Initial commit |
Is there any way I can merge back bar
in to foo
? Technically 1 == A
, 2 == B
, & 3 == C
, but I'm
uncertain how that would be reconciled.