- git clone --bare https://github.com/{username}/{repository}
- Delete original repository in https://github.com/{username}/{repository}/settings.
- Create new repository with the name {repository} at https://github.com/new.
- cd {repository}.git and git push --mirror https://github.com/{username}/{repository}
- Profit