Search code examples
githubrepositorypush-diffusion

How to import diffusion repository to github with complete history?


I have a diffusion repository that I would like to import to github with complete history. I tried a few options that appeared on search. Maybe someone can help what would be the easiest option to do that. Many thanks in advance.


Solution

  • Normally, the easiest option is:

    • create a (completely) empty repository on GitHub (no README, no nothing)
    • go to your local repository
    • add as origin the URL of your new GitHub empty repository
    • push with mirror.

    That is:

    cd /path/to/local/repo
    git remote add origin https://github.com/<me>/<myrepo>
    # if origin already existed, change it with
    git remote set-url origin https://github.com/<me>/<myrepo>
    git push --mirror origin