【发布时间】:2012-11-14 11:42:38
【问题描述】:
在 Heroku 上,我有一个生产应用程序,并且我知道有一个临时应用程序:
$ heroku list
=== My Apps
testivate
testivate-staging
我每个都有遥控器:
$ git remote -v
heroku git@heroku.com:testivate.git (fetch)
heroku git@heroku.com:testivate.git (push)
staging git@heroku.com:testivate-staging.git (fetch)
staging git@heroku.com:testivate-staging.git (push)
几天后,一个部署破坏了我的生产应用程序,所以我使用了heroku rollback,最后创建了我现在使用的暂存应用程序,并将我的代码推送到暂存应用程序,大概是git push staging master。 (这是几天前的事,但我很确定我就是这么做的。)
这一切现在都在我的临时应用程序上运行,所以我正在尝试将我的代码推送到我的生产应用程序。
但是,Heroku 一直告诉我我的生产应用程序已经是最新的:
$ git branch
* master
$ git status
# On branch master
nothing to commit (working directory clean)
$ git add .
$ git add -u
$ git commit -m "trying to commit"
# On branch master
nothing to commit (working directory clean)
$ git push heroku master
Everything up-to-date
$ git remote show staging
* remote staging
Fetch URL: git@heroku.com:testivate-staging.git
Push URL: git@heroku.com:testivate-staging.git
HEAD branch: master
Remote branch:
master tracked
Local ref configured for 'git push':
master pushes to master (up to date)
$ git remote show heroku
* remote heroku
Fetch URL: git@heroku.com:testivate.git
Push URL: git@heroku.com:testivate.git
HEAD branch: master
Remote branch:
master tracked
Local ref configured for 'git push':
master pushes to master (up to date)
但是我知道 Heroku 是错误的,因为我的视图有一些清晰的变化,您可以在我的本地代码和暂存服务器上看到这些变化,但在我的实时生产应用程序上看不到。
例如,比较在我的暂存应用程序中正确为 here 的“返回”链接,但在我的生产应用程序中不是 here。
如何让 Heroku 根据需要更新我的生产应用程序?
谢谢,
史蒂文。
【问题讨论】:
-
您是否查看过
heroku releases以了解生产应用程序的状态/提交? -
谢谢,是的,答案是回滚到回滚之前的版本。
-
@steven_noble 嘿,如果你已经解决了你的问题,post an answer and accept your own answer 完全可以接受 :)
-
是的,通过发布您的答案,您可以将问题从未回答队列中删除,并使未来的访问者更容易看到该解决方案 :)