1. Make sure all branches touch separate files. I would strongly recommend git-filter-repo over git-filter-branch. It's way simpler to use and orders of magnitudes faster.
2. Generate the list of commits in the correct order:
git rev-list --date-order --reverse branchA BranchB BranchC > revisions.txt
3. Go to any branch and: git rebase -i --root --force-rebase
Paste the contents of revisions.txt into the sequence editor and add "p " at the bigging of every line. Run the rebase and you are done.