How to reset Heroku app and still rewrite?

I am creating an application that I am also testing in Heroku. Today I ran into some kind of problem and had to roll back one commit in the local git repository, but Heroku will now not recognize my changes, saying that "everything is up to date."

So by running

git push heroku master 

heroku answers

 Everything up-to-date 

which is wrong.

UPDATE: what i tried

 git push -f heroku master git push --force heroku master git push heroku +master git push --force heroku +master 

Made some changes to 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 
+50
git ruby-on-rails-3 heroku
May 23 '11 at 23:38
source share
9 answers

Sounds weird. Maybe try pushing another branch?

 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 to check. It’s also nice to have a production branch that you can use for deployment.

If this does not work, I think the problem is deeper and you need help from the hero.

EDIT: Add the heroku release admin. Rolling back is as easy as heroku rollback

+50
May 24 '11 at 12:44
source share
— -

This does not work in all situations, but if your local repo deviates from Heroku repo in such a way that git cannot figure out how to reconcile these two types, for example, if you recompiled your local branch after it was clicked on Heroku - you you can force push by putting a plus sign + before ref, for example:

 git push heroku +master 

In your case, this may not work, but it is worth a try.

+44
May 24 '11 at 5:13 a.m.
source share

This worked for me (from https://coderwall.com/p/okrlzg ):

  • Run heroku plugins:install https://github.com/lstoll/heroku-repo.git
  • heroku repo:reset -a APPNAME

From there, the git repository was "reset". Then run:

  • git push heroku master -a APPNAME

to host the git repository and redeploy your application.

+19
Nov 22 '13 at 0:15
source share

Suppose you roll back, you do remotely what previously existed. I think you should do:

 git merge heroku/master 

If you just want to go ahead

or

 git push --force heroku master 

if you want to push this change

+8
May 24 '11 at
source share

I had a similar problem and decided to change it by changing one char in my code and running git add / commit / push again. I think you have already tried this.

Don't break the application, just add a comment to the CSS file or something else and see if this does the trick

luck

+4
May 24 '11 at 5:49 a.m.
source share

I had the same problem and solved it with

Git push origin HEAD: master

For you

Git push heroku HEAD: master

+3
Sep 22 '13 at 13:38
source share

After a while I came up to use a rake task like this deploy.rake

It will standardize and accelerate deployment, especially when migration needs to be implemented.

 puts `git push -f git@heroku.com:#{APP}.git #{current_branch}` 

As you can see, the option - force (or -f ) is used for any click to ignore any conflicts with heroku git repo

But I do not recommend it for beginners :)

0
Feb 28 '14 at 0:15
source share

I had the same problem and tried all the suggestions and did not help. I had to run assets precompiled locally and push, although I did heroku run rake assets:precompile .

 rake assets:precompile git add . git commit -am "local assets precompile" git push heroku master 
0
Mar 24 '15 at 9:45
source share

Your heroku application will automatically reset when you download a new version (slug) that is loading. If you change the application so that it does not load, your application dynamograms will continue to use the old version.

In other words, when you deploy your application, it loads the pool (new source code) into a new dinosaur, and if it dynamically loads the application properly, it will have this dinosaur to replace the existing dinosaurs that launch your application.

It may be your problem that you do not see any changes ...

If you have magazines from git push heroku , post them.

Edit: git reset deals with git indexes, not a working tree or current branch.

You have a check for them that you reset to actually change the files - how it interacts with the hero, I'm not sure (I have never rolled back the deployment to the hero yet, my fingers are crossed), but I hope it helps. Maybe try to do git push heroku after your order?

-one
May 23 '11 at 23:45
source share



All Articles