Baseline: Two websites, one of which was created by copying the other, some time ago. Since then, many files were edited, some heavily, some are still identical.
Where I came in: I put both into Gits, started patching things up, making commits.
Now, I'd like to recombine the repos, realizing a lot of patches should really be shared. Ideally, I'd keep each project as branch A and branch B, sharing all the changes done to the parts that are still common, or easily merging changes that can still apply to the parts that changed but not by much.
How do I go about this, starting with two completely separate, but internally very similar repos?