错误:src refspec master与any不匹配。未能将一些参考文献推送到heroku

时间:2014-05-08 21:49:11

标签: git heroku

我正在分支机构并将该分支仅推送到heroku。

我一直在做

git push heroku master branchname:master 

自昨天以来一直出现故障

继续得到这两个错误

error: src refspec master does not match any.
error: failed to push some refs to 'git@heroku.com:repo.git'

试过了

git pull heroku master 

得到了这个

 * branch            master     -> FETCH_HEAD

然后做另一个

git push heroku master branchname:master 

仍然得到相同的错误

试过了

git push -f heroku master branchname:master

这可能是一个git问题。我没有遇到推进bitbucket的麻烦。

我在stackoverflow上读了几个问题/答案,但是他们都在处理github而不是heroku?

1 个答案:

答案 0 :(得分:7)

似乎你要做的是

git push heroku master

或者,如果您目前使用的是Branchname,则意思相同

git push heroku branchname:master

从联系手册:

  

git push [repository [refspec ...]]

     

...的Refspec

   Specify what destination ref to update with what source object. The format of a <refspec> parameter is an optional
   plus +, followed by the source object <src>, followed by a colon :, followed by the destination ref <dst>.
相关问题