【发布时间】:2014-02-11 10:29:32
【问题描述】:
我已尝试遵循this 帖子中建议的解决方案,但它不起作用,我仍然得到:src refspec master does not match any。
这是我所做的: 关注this解决方案
// adding the file I created
$ git add .
$ git commit -m 'initial commit'
$ git push origin master
error: src refspec master does not match any.
做的时候:
$ git push origin HEAD:master
b40ffdf..a0d1423 HEAD -> master // looks promising
// adding a remote
$ git remote add devstage -f <another git>
$ git merge devstage/master -s recursive -X ours
$ git push -u devstage master
error: src refspec master does not match any.
更多信息:
$ git branch
* origin
$ git show-ref
refs/heads/origin
refs/remotes/devstage/master
refs/remotes/origin/HEAD
refs/remotes/origin/devstage
refs/remotes/origin/master
refs/remotes/origin/origin
所以我肯定缺少 refs/heads/master 但不知道如何创建它。
谢谢
【问题讨论】:
-
你是如何创建你的仓库的?你创建了什么文件?
-
@MichaelVer: git clone https://
@bitbucket.org/ -
最近 Github 将
git push origin master改为git push origin main -
是重复的问题 Git: Message stackoverflow.com/questions/4181861/…
标签: git git-push git-remote