简体   繁体   English

git push heroku master给我报错

[英]git push heroku master is giving me an error

I have a react app i'm trying to deploy to heroku, However when I run git push heroku master, I'm receiving the error below.我有一个反应应用程序,我正在尝试部署到 heroku,但是当我运行 git push heroku master 时,我收到以下错误。 How can this be fixed please?请问这个怎么解决?

To https://git.heroku.com/getsoundtracks.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/getsoundtracks.git'

I am not familiar with Heroku, but this error basically means that you are trying to push directly to a protected branch - master .我对 Heroku 不熟悉,但是这个错误基本上意味着您正在尝试直接推送到受保护的分支master

This is quite normal actually (even the default IIRC) for the master branch.对于 master 分支,这实际上是很正常的(即使是默认的 IIRC)。 You will probably need to do one of the following:您可能需要执行以下操作之一:

  • create a "development" branch and push that to the remote and then merge that into master in Heroku (merge request or such?)创建一个“开发”分支并将其推送到远程,然后将其合并到 Heroku 中的 master (合并请求等?)
  • Edit the master branch in Heroku and set it to unprotected编辑 Heroku 中的 master 分支并将其设置为unprotected

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM