To try out the function branch, I pushed it to the Heroku host (since this is the only branch that it uses for your site), that is, I did:
git push heroku feature-foo:master
Meanwhile, I made some commits in my local master branch. Now I want to push my local host to Heroku, but I get:
To git@heroku.com :foo-repo.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to ' git@heroku.com :foo-repo.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Merge the remote changes (eg 'git pull') hint: before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
This makes sense, because indeed the Heroku master is indeed located on my feature-foo branch and is thus ahead of the host. But I do not want to pull and merge with Heroku, because it will be the same as merging my feature-foo branch, which I do not want to do. Right now, I just want to push my local master without committing the -foo function. (Indeed, I have already used heroku rollback , so changes to the heroku rollback function are not live on the site.)
How to do it?
source share