git上傳整個專案到碼雲
阿新 • • 發佈:2019-01-09
一、簡介
上傳demo專案到碼雲。
二、操作
1.在碼雲上建立一個demo專案獲取到專案地址:
https://gitee.com/name/demo.git
2.進入到demo專案根目錄,並初始化git
cd demo
git init
3.將程式碼新增到遠端倉庫
git remote add origin https://gitee.com/name/demo.git
4.推送到遠端倉庫master
git add .
git commit -m '初始化工程'
git push -f origin master
5.推送到遠端伺服器會報錯:需要下載碼雲目錄中的README.md檔案
git pull --rebase origin master
6.再次推送到遠端倉庫master
bogon:cfl-account-boot chenfenli$ git push -f origin master Counting objects: 363, done. Delta compression using up to 4 threads. Compressing objects: 100% (213/213), done. Writing objects: 100% (363/363), 55.07 KiB | 1.08 MiB/s, done. Total 363 (delta 67), reused 0 (delta 0) To https://gitee.com/chenfenli/cfl-account-boot.git 63ab001..b910d7c master -> master bogon:cfl-account-boot chenfenli$