一、登錄gitlab,創建項目
二、創建密鑰(win10 git bash)生成key並添加ssh key
2.1 生成id_rsa和id_rsa.pub
ssh-keygen -t rsa -C "mars@xxxchina.com.cn"
2.2 找到C:\Users\登錄用戶名\.ssh 目錄,里面有兩個文件:id_rsa和id_rsa.pub,用文本編輯器打開id_rsa.pub
2.3 復制項目url
2.4 git bash進入本地文件夾
2.5 輸入用戶配置信息
git config --global user.name "mars" git config --global user.email "mars@casachina.com.cn"
2.6 clone工程至本地
git clone http://IP:port/mars/auto_test.git
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
2.7 提交本地代碼
git commit -m "added project DataDrivenTest"
git add .
git commit -m "Added DataDrivenTest"
git push origin master