首先在电脑上建立要下载到的文件夹
在桌面上建立git文件夹
其次到要下载的代码页面,复制地址
打开终端,到目的文件夹下
cd C:\Users\hp\Desktop\git
输入地址为刚刚复制的
git clone https://github.com/ll/vue.git
成功则显示
若此处出现下列错误,见我之前博客的解决办法
fatal: unable to access 'https://github.com/ll/vue.git/': error setting certificate verify locations:
CAfile: D:\Program Files\Git\mingw64/bin/curl-ca-bundle.crt
CApath: none
打开目的文件夹发现出现文件
但里面没有我们想要的分支内容
若目的文件里面有多层分支如
则在终端进入目的文件路径
cd C:\Users\hp\Desktop\git\vue-basic
输入
git checkout lesson-1
出现如下图则成功
再次打开目标文件夹,出现目标内容