1、本地新建一个文件夹,用来存放等下要拉取的代码

2、登录GitLab,找到要拉取的项目,复制地址

3、在终端执行,克隆
cd ./existing_folder # 上面新建的是test文件夹,existing_folder即为test,"./"为前面的路径
git clone git@git.com:.git # git@git.com:.git为第2步复制的内容

4、克隆成功后,新切一个自己的分支,以后修改都在自己的分支上,不要在master上
git branch # 查看当前分支,发现是master
git checkout -b dev_s # 新建并切到自己的分支上
git branch # 再检查一遍嘻嘻

5、完成拉取到本地,可以查看test文件夹的内容看看啦
网友评论