如何重置Heroku应用程序并重新提交所有内容? [英] How to reset Heroku app and re-commit everything?

查看:422
本文介绍了如何重置Heroku应用程序并重新提交所有内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个我也在Heroku中测试的应用程序。我今天遇到了一些问题,不得不在我的本地git仓库中回滚一个提交,但Heroku现在不会识别我的更改,说一切都是最新的。



<所以,运行

  git push heroku master 

heroku响应

 所有最新的

这是不正确的。



更新:已经试过了

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

对源代码进行了一些更改然后

  git add。 
git commit -a -mMessage#(然后这个提交显示在我的git资源管理器中)
git push heroku master #Everything最新


解决方案

听起来很奇怪。

  git分支制作
git checkout制作
#做一些代码更改
git commit -am一些绝望的代码更改尝试修复heroku
git push heroku生产:master

创建新的生产分支是我希望您测试的。此外,有一个可用于部署的生产分支是很好的。



如果它不起作用,那么我认为问题会更深入,您需要帮助heroku。



编辑:
也添加 heroku发行版插件。回滚就像 heroku rollback


一样简单

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

这篇关于如何重置Heroku应用程序并重新提交所有内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆