如何将/home/username/www/example.git与远程添加命令一起使用?
如果我使用这个:
git remote add origin user@example.com:/home/user/www/example.git
git push origin master我得到了这个错误:
error: src refspec master does not match any.
error: failed to push some refs to 'user@example.com:/home/user/www/example.git'发布于 2011-03-07 18:40:20
git推送的默认行为是推送“匹配refs",即在本地和远程存储库中都存在的分支。在您的示例中,没有这样的分支,因此您需要告诉git push显式地推送哪些分支,即通过
git push origin branch-to-be-pushed或者,如果您想推送所有分支,
git push --all originhttps://stackoverflow.com/questions/5218573
复制相似问题