Duplicating (mirroring) a repository

To make an exact duplicate, you need to perform both a bare-clone and a mirror-push.

git clone --bare <reponame>
# Make a bare clone of the repository

cd <reponame>
git push --mirror <newreponame>
# Mirror-push to the new repository

Leave a Reply

Your email address will not be published. Required fields are marked *