在拷贝github上优秀的开源项目时,每次使用git
clone命令都要等好久。上网查找了很多办法,有改host文件的,也有修改ip的。还有把项目fork再添加到gitee中再clone的(因为gitee是国内的服务器,再clone就会很快)。都比较麻烦
这里有两个很简便的方法亲测有效
以clone vue 为例:
git clone https://github.com/vuejs/vue.git
1. 使用cnpm代理
git clone https://github.com.cnpmjs.org/vuejs/vue.git
2. 使用码云的镜像
git clone https://gitee.com/mirrors/vue.git