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 reco
Supposing you rolled back one commit you remotely did, that previously existed. I think you should make:
git merge heroku/master
If you just want to go forward
or:
git push --force heroku master
if you want to push that change
I once had a similar problem and solved it by changing one char in my code and running git add/commit/push again. I imagine you've already tried that though.
Don't break the app, just add a comment to a CSS file or something and see if that does the trick
good luck
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.
After a while I came up to use rake task like this one deploy.rake
It will standardize and speed up deployment especially when migrations should be implemented
puts `git push -f git@heroku.com:#{APP}.git #{current_branch}`
As you see, option --force (or -f) is used for any push in order to ignore any conflicts with heroku's git repo
But I don't recommend it for newcomers :)
Your heroku app will automatically reset when you upload a new version (slug) that boots. If the change you app in a way that makes it not boot, your apps dynos will continue to run the old version.
In other words, when you deploy your app, it loads the slug (new source code) into a new dyno, and if the dyno loads the app properly, it will have that dyno replace the current dynos running your app.
This might be your problem in not seeing any change...
If you have logs from the git push heroku
please post them.
Edit:
git reset
deals with the git indexes and not the working tree or current branch.
You have to them checkout the commit you reset to actually change the files-- how this interacts with heroku, I'm not so sure (never having rolled back a deploy to heroku yet, fingers crossed), but hope it helps. Maybe try doing a git push heroku
after your checkout?
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.