github使用 建立專案後上傳到github

2021-10-01 04:30:54 字數 569 閱讀 7845

本地建立專案,同步到github,有兩種方法:

(1)github上建立resp,clone到本地,該倉庫作為專案,即可push和pull。

(2)本地建立專案,github上建立同名倉庫,git remote add,git push -u,即可push和pull。

最近使用xcode,建立新倉庫clone到本地,用xcode開啟後,建立file只能建立file,無法選擇template。第一種方法行不通,採用第二種方法。

進行push:git push --set-upstream origin maste,報錯如下:

本地缺少遠端倉庫的一些work,需要pull一下。

那就pull一下:

git pull --rebase origin master

再push一下:

git push -u origin master

或者git push --set-upstream origin master

done.

如何使用github上傳專案

參考資料 1 先右鍵你要上傳的專案,選擇git bush here 2 接下來輸入你要將專案上傳的位址。輸入git clone https 使用者名稱 密碼 github.com kepcum test1.git 是你的url 3 然後你的專案中會多出乙個test1 test1為你要上傳到的gith...

如何使用github上傳專案

1 如何把本地專案上傳到github 2 地專案上傳到github 報錯 master master non fast forward 3 git強制新增 add 檔案 4 git強制覆蓋master分支 前提 1 乙個倉庫最大100m,超過則上傳失敗 解決辦法 刪除target 2 刪除.git資...

github上傳專案

echo office automation script readme.md git init 在專案根目錄執行init git add readme.md git commit m first commit git remote add origin git push u origin mast...