Import into github from gitorious?

后端 未结 4 492
旧时难觅i
旧时难觅i 2021-02-04 12:15

Has anyone tried or figured out how to import a gitorious repo into github? I already use github and wanted to see if there was a way to pull from a gitorious repo that I wanted

4条回答
  •  春和景丽
    2021-02-04 12:24

    The previous answers are correct, but here's the step by step process including the missing step of delinking the local copy from Gitorious; without it, you'll get the error fatal: remote origin already exists when you try to add Github as the new origin.

    1. Create empty target repo on Github
    2. Clone repo from Gitorious to local
    3. Remove Gitorious as origin
    4. Add Github as new origin
    5. Push to Github

    Commands:

    git clone git://gitorious.org/USER/REPO.git
    cd REPO
    git remote rm origin
    git remote add origin https://github.com/USER/REPO.git
    git push --mirror https://github.com/USER/REPO.git
    

    You'll obviously need to substitute USER and REPO, and the last two commands are provided for you after step 1 when you create your Github repo.

提交回复
热议问题