我克隆我的存储库:
git clone ssh://xxxxx/xx.git
但是在我更改了一些文件和add它们commit之后,我想将它们推送到服务器:
add
commit
git add xxx.php git commit -m "TEST" git push origin master
但我回来的错误是:
error: src refspec master does not match any. error: failed to push some refs to 'ssh://xxxxx.com/project.git'
也许你只需要承诺。当我这样做时,我遇到了这个:
mkdir repo && cd repo git remote add origin /path/to/origin.git git add .
哎呀!从未承诺!
git push -u origin master error: src refspec master does not match any.
我所要做的就是:
git commit -m "initial commit" git push origin master
成功!