推送到GitHub的初始提交时出错

时间:2015-04-09 14:01:31

标签: git github vagrant

我在GitHub中创建了一个新项目。然后我进入了我的目录并执行了以下操作;

git init
git status
git remote add origin https://github.com/path....
git push -u origin master

然后询问我的GitHub的用户名和密码。我提供的。然后我得到以下错误;

error: src refspec master does not match any.
error: failed to push some refs to 'https://github.com/path....'

我正在使用Vagrant / VirtualBox。

1 个答案:

答案 0 :(得分:1)

Git是一个分布式版本控制系统。在push到遥控器之前,您必须commit在本地:

git add somefile.txt
git commit
git push -u origin master
相关问题