Creating a mirror of a repo

This lets you have an exact same copy of a repo on your account, starting from a blank repo, ending with the exact same commits, branches...

First create a blank repo on Github or Gitlab or any other.

Creating Mirror

git clone --mirror https://gitlab.com/someone/repo.git
cd repo.git
git remote add gitlab https://gitlab.com/you/repo.git
git push --mirror gitlab

Updating mirror

cd repo.git
git fetch origin
git push --mirror gitlab

Last updated