解决 git clone 慢的问题

因为局域网的关系,在*境内访问github非常吃力,git clone一个代码仓库时常中途失败,重头再来,分享一个解决该问题的办法:

  1. 登录码云: https://gitee.com/

  2. 在码云创建一个仓库

  3. 创建仓库时,点击导入已有仓库
    解决 git clone 慢的问题

  4. 填写github的仓库地址
    解决 git clone 慢的问题

  5. 点击创建

  6. 在码云中创建的项目找到gitee的仓库地址
    解决 git clone 慢的问题

  7. git clone https://gitee…

  8. 克隆gitee项目完成后, git remote set-url origin https://github…(把本地仓库的URL重新设置成github的)

  9. 至此,github仓库已完美克隆到本地。