简体   繁体   中英

Remote branch ahead of local branch; can't push

I'm trying to push to heroku, but I recently dropped back a few commits as the production and local code were both flawed. Now I'm getting the error:

Updates were rejected because the tip of your current branch is behind its remote counterpart. Merge the remote changes (eg 'git pull') before pushing again.

I don't want to pull from the remote, but rather push the code I have locally.

How can I do that?

I'm an idiot. I went back and read the next line.

If it helps anyone in the future, the answer is to use --force:

git push heroku master -f

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