This comes in handy when you got selfhosted server like gitea and want to upload the whole project to public via GitHub.

git clone --bare https://example.com/exampleuser/old-repository.git
cd old-repository.git
git lfs fetch --all
git push --mirror https://example.com/exampleuser/new-repository.git
git lfs push --all https://example.com/exampleuser/new-repository.git

Source: