This is experimental. Methodology is questionable. Any feedback is welcome.
- Take a parent repository
- Take a child repository
cd child; git checkout master; git remote add upstream email@example.com:Example/example.git; git checkout -b parent; git push -u origin parent; git branch -f --track parent upstream/master; git checkout parent; git checkout -b parent-merge; git rebase -i -s recursive -X theirs master;
From here I reword the first commit to be
Example Website and then
fixup the rest of the commits.
:%s/pick/fixup/g- This will replace all
This means there will only be one commit for the previous site, just do condense the reflogs.
If you need to revert older commits (that won't be affected by the parent) I'd suggest not squashing.
git push origin parent-merge;
This wont be an issue if the repo was empty before merge. At this point, you may want to review any files that have trailed from before the merge that are not needed. Would be interested to know about any good ways to remove these files easily, without having to go through everything.
Then PR into master.