How do I create a github mirror for an external git repository, such that it appears as \"real mirror\", e.g., as in https://github.com/mirrors?
So far, I set up a m
According to Importing a Git:
For purposes of demonstration, we'll use:
- An external account named extuser
- A GitHub personal user account named ghuser
- A GitHub repository named repo.git
The command line:
# Makes a bare clone of the external repository in a local directory
$ git clone --bare https://githost.org/extuser/repo.git
# Pushes the mirror to the new GitHub repository
$ cd *repo.git*
$ git push --mirror https://github.com/ghuser/repo.git
# Remove the temporary local repository.
$ cd ..
$ rm -rf repo.git