There was once a giant repository. Months ago, it was split up by making a copy of it for each sub-repo and running this on each copy:
git filter-branch --subdirectory-filter dir-to-become-a-sub-repo/ -f
Now I want two of those sub-repos to be one, as though they were split off from the giant repository together in the first place (while preserving all the commits made to them since then).
I tried to follow the procedure here (I found many slight variations of it pasted around stackoverflow too): https://saintgimp.org/2013/01/22/merging-two-git-repositories-into-one-repository-without-losing-file-history/ But it merely clumped the two repositories together without fusing the old commits that had matching messages and timestamps.
For example: After following the merge procedure in the link, there are two "Initial commit" commits on separate lines of the timeline, and they both have the exact same message and timestamp. I want pairs of commits like these two to be squashed into one commit again.