git 远程 /home/用户名/www/lorem.git
如何通过远程添加命令使用 /home/username/www/example.git ?
如果我使用这个:
git remote add origin [email protected]:/home/user/www/example.git
git push origin master
我收到此错误:
error: src refspec master does not match any.
error: failed to push some refs to '[email protected]:/home/user/www/example.git'
How can I use /home/username/www/example.git with remote add command?
if I use this:
git remote add origin [email protected]:/home/user/www/example.git
git push origin master
I got this error:
error: src refspec master does not match any.
error: failed to push some refs to '[email protected]:/home/user/www/example.git'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
git push 的默认行为只是推送“匹配的引用”,即本地和远程存储库中都存在的分支。在您的示例中,没有这样的分支,因此您需要告诉 git push 显式推送哪些分支,即通过
or,如果您想推送所有分支,
Default behaviour of git push is just to push "matching refs", i.e. branches which are present both in the local and the remote repository. In your example, there are no such branches, so you need to tell git push which branches to push explicitly, i.e. via
or, if you want to push all branches,