問題記錄:
在使用git bash指令将項目上傳到github時,遇到的問題。
錯誤:
error: src refspec master does not match any.
error: failed to push some refs to 'xxx'
分析:
應該未能将某些引用推到'git @ Github.com:xxx.git’
可能就是倉庫為空。
解決辦法三步曲:
1、将所有的檔案全部都添加,然後再進行git commit -m "init"将所有的檔案commit,
git commit -m "init"
2、然後在執行
$ git remote add origin xxxxxxxx.git
3、最後使用
$ git push -u origin master