After following the official heroku instructions on how to deploy an application, I have run "git push heroku master" but i get the following error:
To https://git.heroku.com/miguelangelparedes.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://git.heroku.com/miguelangelparedes.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Strangely, after i run "git pull", it says that everything is up to date, and when i push again, i get the same error. Would be nice if someone helped
git pull
first and then try the push again.git push -f
, but this will OVERWRITE the server's version, so you have to be very careful.Heroku apps only run off of the master branch of the app repository (local to Heroku). If you want to deploy a branch to Heroku which isn't the master branch of your local repo, then you need to specify it Try git push my-branch-name:master. You'll likely need to add the -f flag to force push.
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.