You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

References:

ITER git repository: https://git.iter.org/projects/IMEX/repos/gittest/browse
ACH gitlab repository: https://gitlab.eufus.psnc.pl/ach/gittest

  1. Create or select origin repository, in this case it was ITER git repository
  2. Clone origin repository with --mirror flag:

    git clone --mirror ssh://git@git.iter.org/imex/gittest.git
  3. Change directory to newly cloned mirror repository:

    cd gittest.git
  4. Push mirrored repository to new origin with --mirror  flag:

    git push --mirror git@gitlab.eufus.psnc.pl:ach/gittest.git

    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). This is not what we want. Read the next section to discover what to do in these cases.

  • No labels