gitlab上傳本地項目


一、登錄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

 

 

 

 




免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM