Skip to content

Instantly share code, notes, and snippets.

@sommereder
Created May 8, 2021 07:26
Show Gist options
  • Select an option

  • Save sommereder/ebf8d649f11e16e4a9601f76328a4338 to your computer and use it in GitHub Desktop.

Select an option

Save sommereder/ebf8d649f11e16e4a9601f76328a4338 to your computer and use it in GitHub Desktop.

Revisions

  1. sommereder created this gist May 8, 2021.
    13 changes: 13 additions & 0 deletions move-repo.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    Create a new repository on GitHub: https://github.com/new

    Checkout the repository from the old provider using `git clone --mirror`, which implies `-bare` and thus does not generate a working copy:

    ```git clone --mirror git@somewhere.com:company/myrepo.git```

    Change into project directory:

    ```cd myrepo.git```

    Push to the new Git Server:

    ```git push --mirror git@github.myorg/myrepo.git```