I'm building an application which I'm also testing in Heroku. I ran into some problem today and had to rollback one commit in my local git repo, but Heroku now won't recognize my changes saying that "everything is up to date".
So, running
git push heroku master
heroku responds with
Everything up-to-date
which isn't true.
UPDATE: Things I've tried
git push -f heroku master
git push --force heroku master
git push heroku +master
git push --force heroku +master
Did some changes in the source code and then
git add.
git commit -a -m "Message" #(Then this commit shows in my git explorer)
git push heroku master #Everything up-to-date
Sounds weird. Maybe try pushing a different branch would do?
git branch production
git checkout production
#do some code changes
git commit -am "some desperate code changes to try fix heroku"
git push heroku production:master
Creating a new production branch is what I want you to test. Besides, it's nice to have a production branch that you can use to deploy.
If it doesn't work, then I think the problem runs deeper and you need help from heroku.
EDIT:
Add the heroku releases addon too. Rolling back is as easy as heroku rollback
This doesn't work in all situations, but if your local repo has diverged from the Heroku repo such that git can't figure out how to reconcile the two -- like if you rebased your local branch after it was pushed to Heroku -- you can force a push by putting a plus sign + before the ref, like this:
git push heroku +master
It may not work in your case, but it's worth a try.
This worked for me (from https://coderwall.com/p/okrlzg):
heroku plugins:install https://github.com/lstoll/heroku-repo.git
heroku repo:reset -a APPNAME
From there, the git repository has been "reset". Next, run:
git push heroku master -a APPNAME
to seed the git repository and re-deploy your app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With