git拉取代碼到本地


把代碼獲取到某個文件夾,在文件夾右鍵  選擇Git Bash Here

第一步:

git config --global user.name "git權限的名稱"

第二步:

$ git config --global user.email "git的帳號"

第三步:

$ git clone -b develop XXX  需要獲取的代碼 如:http://git.ui-tech.cn/asset/data-transfer

這是獲取某個分支的代碼

提交本地代碼到遠程服務器

第一步:git pull 先獲取代碼

第二步:git status 查看狀態

第三步:git add 添加要提交的代碼地址

第四步:git commit -m "備注提交代碼的功能"

第五步:git push 提交代碼到遠程服務器

 

master 分支轉developer分支

$git checkout developer

刪除遠程某個文件夾

git rm -r --cached "刪除文件夾遠程地址"   #--cached不刪除本地的測試

git commit -m '刪除備注'

git push

獲取最新代碼(本地已修改的情況下)

git stash 

git pull -r 

git stash pop


免責聲明!

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



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