1.gitlab 创建project ,命名为test2
2.git push项目
git remote add *******
mkdir test1
cd test1
git init
nano test1.txt --1111
git add test1.txt
git commit -m "tets1"
git remote add origin http:********
#如果gitlab有文件,则先pull 后push
git pull origin master
git push -u origin master
#如果gitlab没有文件,则直接push
git push -u origin master
3.git 克隆项目
git clone http:...........
自动创建test2目录
cd test2
nano data.py
git add data.py
git commit -m "data.py"
git push -u origin master
原文:https://www.cnblogs.com/hapyygril/p/11714959.html