简体   繁体   中英

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. 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 .

This is quite normal actually (even the default IIRC) for the master branch. 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?)
  • Edit the master branch in Heroku and set it to unprotected

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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