Git Repository Migration

  1. Copy the entire repository

    1
    git clone --mirror <url to ORI repo> temp-dir

    Or:

    1
    2
    3
    4
    git clone <url to ORI repo> temp-dir
    git branch -a
    git checkout branch-name
    git fetch --tags
  2. Before doing the next step make sure to check your local tags

    1
    2
    git tag
    git branch -a
  3. Now clear the link to the ORI repository

    1
    git remote rm origin
  4. Now link your local repository to your newly created NEW repository

    1
    git remote add origin <url to NEW repo>
  5. Now push all your branches and tags

    1
    2
    git push origin --all
    git push --tags
感谢支持,让我安静的做蚂蚁梦!