Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

    Code Block
    git clone --mirror ssh://git@git.iter.org/imex/gittest.git


  3. Change directory to newly cloned mirror repository:

    Code Block
    cd gittest.git


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

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


    Info
    titleWarning!

    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.