Alper Akture
Alper Akture

Reputation: 2465

How do you force a deploy to Heroku without doing a git commit

I had a case where a push to heroku failed because of a database issue. I fixed it, but the only way I know to deploy is via "git push heroku master". Since I didn't commit anything, it won't push a new deployment. The only way I can get it to deploy to make some minor change and then do it. Is there a way to force a deploy? I'm using play 2.1.2.

Upvotes: 5

Views: 3642

Answers (3)

Chloe
Chloe

Reputation: 26294

https://www.darraghoriordan.com/2019/03/02/heroku-push-failed-force-rebuild/

heroku plugins:install heroku-releases-retry
heroku releases:retry
# or
heroku releases:retry --app darragh-starter

Upvotes: 1

Tom
Tom

Reputation: 135

If you are just trying to reload the dynos you can issue this from the command line:

heroku restart -a appname

More info https://devcenter.heroku.com/articles/application-offline

Upvotes: -1

user3399857
user3399857

Reputation: 66

You could try a throw-away commit if you concern is to avoid actually saving the 'minor/dummy' commits to the repo permanently:

Heroku Throwaway Commit

See Section: "Automating the throwaway commit"

The author has basically automated the above with a quick bash script; however, as the author indicates use with caution -- you wouldn't want to use this in other situations with un-tested code.

Upvotes: 4

Related Questions