How to duplicate a Git repo
Duplicate a Git repo without forking it
Sometimes you will want duplicate a repository without forking it. The process from was taken from the GitHub documentation pages at https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/duplicating-a-repository.
Linux/Mac
Open up terminal.
$ git clone --bare https://github.com/exampleuser/old-repository.git
$ cd old-repository.git
$ git push --mirror https://github.com/exampleuser/new-repository.git
$ cd ..
$ rm -rf old-repository.git