win10下git本地倉庫連接遠(yuǎn)程倉庫
寫在前面
本文主要是記錄連接時(shí)遇到的錯(cuò)誤及解決方案,方便各位猿友再遇到相似問題時(shí)可以及時(shí)解決,少走彎路。
你我踟躕行路,皆是行者
問題清單
error : src refspec master does not match any
error : failed to push some refs to 'https://github.com/name/Demo_name.git'
fatal : remote origin already exists
fatal : 'oringin' does not appear to be a git repository
fatal : Could not read from remote repository
-
fatal : Updating an unborn branch with changes added to the index
解決方案
目錄中沒有文件,無法提交空目錄上去。
增加文件
git add text
添加注釋
git commit -m 'comment_name'
推上去
git push origin master
先拉后推
先將遠(yuǎn)程倉庫pull進(jìn)本地倉庫
然后再push出去
- 已經(jīng)建立了遠(yuǎn)程連接
存儲(chǔ)庫不對(duì)
重新調(diào)整存儲(chǔ)庫
- 該點(diǎn)與上點(diǎn)一起
致命的:更新未出生的分支,并將更改添加到索引
在拉倉庫時(shí)發(fā)生這個(gè),不需要在意2333