...
- Create or select origin repository, in this case it was ITER git repository
Clone origin repository with --
mirror
flag:Code Block git clone --mirror ssh://git@git.iter.org/imex/gittest.git
Change directory to newly cloned mirror repository:
Code Block cd gittest.git
Push mirrored repository to new origin with
--mirror
flag:Code Block git push --mirror git@gitlab.eufus.psnc.pl:ach/gittest.git
Info title Warning! Don’t use
git push --mirror
in repositories that weren’t cloned by--mirror
as well. It’ll overwrite the remote repository with your local references (and your local branches).Check current remote repository:
Code Block git remote -v
It shall print:
Info icon false origin git@gitlab.eufus.psnc.pl:ach/gittest.git (fetch)
origin git@gitlab.eufus.psnc.pl:ach/gittest.git (push)