1,准备空的文件夹,git init
2,关联远程仓库,git remote add origin gitlab地址
3,拉取远程分支代码,git pull origin 远程分支名
再用IDEA打开项目即可