Exporting the complete repo history in a form of patch files (based on https://randombrainworks.com/2017/02/17/git-moving-commits-between-repositories/):
cd path/to/orig/repo git format-patch --output-directory ../patches $(git rev-list --max-parents=0 HEAD) $(git rev-list HEAD -1)
Create a 2nd repo (here for testing purposes):
cd path/to/new/repo git init
Import into the 2nd repository:
cd path/to/new/repo git am path/to/orig/patches/*.patch