Heroku应用程序不会在git push heroku master之后得到更新 [英] Heroku app doesn't get updated after git push heroku master

查看:119
本文介绍了Heroku应用程序不会在git push heroku master之后得到更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经与Yeoman制作了一个Angular应用程序并将其部署到了heroku。最初的推动很好。我能够访问该网站。然而,当我做了一些改变并尝试做git舞:

  git add。 
git commit -mmessage
git push heroku master

网站即使在推送过程中没有发生错误,也不会更新新的更改。



为了检查这些更改是否实际推送到了heroku,我检出了一个新分支并进行了一些更改,然后提交并运行:

  git add。 
git commit -mnew changes
git push heroku new_branch:master
git co master
git pull heroku master

之后,我可以看到本地主分支能够从heroku提取新的更改。因此,我的问题是,为什么网站没有显示更改。 (PS:我每次运行heroku时都运行heroku,而且在推送过程中,终端显示gifsicle和jsonify似乎无法正常工作,这是否是原因?)

解决方案

对于任何人在这里结束了同样的问题。 确保您在推送前建立您的客户端代码。我有完全相同的问题,花了几个小时的时间调试才意识到我已经忘记在推送之前运行 ng-build -prod
我的本地更改被推送,但我的客户端生产代码显然仍然相同。 ;(

I have made an Angular app with Yeoman and deployed it to heroku. The initial push was fine. I was able to access the website. However, when I made some changes and try to do the git dance:

    git add .
    git commit -m "message"
    git push heroku master

the website is not updated with the new changes even though there is no error occurred during the push.

In order to check if the changes are actually pushed to heroku, I checked out a new branch and make some changes then commit and run:

   git add .
   git commit -m "new changes"
   git push heroku new_branch:master
   git co master
   git pull heroku master

After that, I am able to see the local master branch is able to pull the new changes from heroku. Therefore, my question is that why the website is not showing the changes. (PS: I ran heroku restart everytime I push to heroku. Also, during pushing, the terminal shows that gifsicle and jsonify seems to not work correctly. Could that be the cause?)

解决方案

For anyone else ending up here with the same question. Make sure you build your client code before you push. I had the exact same problem, spent hours debugging only to realize i had forgotten to run ng-build -prod before pushing. My local changes was pushed but my client production code was obviously still the same. ;(

这篇关于Heroku应用程序不会在git push heroku master之后得到更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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