github上傳本地代碼庫步驟

1、在github上創建版本庫cpptest

2、在ubuntu上代碼路徑/home/mnt/c/cpptest/目錄下執行git init

3、git add *

4、git commit -m “cpp file test”

5、git remote add origin [email protected]:greatitman/cpptest.git

6、git push -u origin master,此步若出現類似“non-fast-forward errors”的錯誤,則執行7

7、git pull,此步若出現“branch.master.merge”類似錯誤,則執行8

8、修改配置文件.git/config或執行如下命令

git config branch.master.remote origin

git config branch.master.merge refs/heads/master

發佈了29 篇原創文章 · 獲贊 1 · 訪問量 2萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章