git Heroku 没有更新我的代码?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22600382/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Heroku is not updating my code?
提问by Louis93
So I did some CSS changes on my local, ran git add .
, git commit -am "Hello"
, git push heroku master
, and for some reason two commmits ago, things stopped getting updated.
因此,我在我的地方,进行了一些CSS的变化git add .
,git commit -am "Hello"
,git push heroku master
,出于某种理由二commmits前,东西停止得到更新。
It commits fine, and doesn't show any input out of the ordinary.
它提交得很好,并且没有显示任何异常的输入。
I tried making a new branch and pushing it to the heroku
branch, but still nada. What gives?
我尝试创建一个新分支并将其推送到该heroku
分支,但仍然没有。是什么赋予了?
回答by Adam Mendoza
Make sure your local branch is master. If you're using a different local brach then you have to use.
确保您的本地分支是 master。如果您使用的是不同的本地分支,则必须使用。
git push heroku your_local_branch_name:master
回答by rdegges
Try running 'heroku releases' and 'heroku ps' on the command line.
尝试在命令行上运行“heroku release”和“heroku ps”。
heroku releases
should show you which git version Heroku currently has running -- this will let you compare your local git revision to the one Heroku has, to ensure it actually receivedyour updates.
heroku releases
应该向您显示 Heroku 当前正在运行的 git 版本——这将让您将本地 git 修订版与 Heroku 的版本进行比较,以确保它确实收到了您的更新。
Next, you might want to check heroku ps
, and verify your app is running as expected.
接下来,您可能需要检查heroku ps
并验证您的应用程序是否按预期运行。
Lastly, if all else fails, try running heroku run bash
, and looking at the files Heroku has on your Dyno, if it doesn't add up -- email Heroku support!
最后,如果所有其他方法都失败了,请尝试运行heroku run bash
,并查看 Heroku 在您的 Dyno 上的文件,如果没有加起来 - 发送电子邮件给 Heroku 支持!
回答by Intteco
If your domain uses Cloudflare DNS, try to "Purge Cache" from the Cloudflare account.
如果您的域使用 Cloudflare DNS,请尝试从 Cloudflare 帐户“清除缓存”。
回答by Nicole Hemenway
Try running:
尝试运行:
bundle exec rake assets:precompile
Then gitting:
然后吉丁:
git add .
git commit -m "asdfasdf"
git push heroku master
回答by danclark
I had this issue this morning, and I couldn't figure it out. I looked at the files on the instance, and they were correct, but the site was still serving up the old version.
我今天早上遇到了这个问题,我无法弄清楚。我查看了实例上的文件,它们是正确的,但该站点仍在提供旧版本。
My solution, delete the instance and start over. The new instance was responding appropriately to git push, so this makes me think that there could be a deeper issue in heroku's infrastructure.
我的解决方案是删除实例并重新开始。新实例对 git push 做出了适当的响应,所以这让我认为 heroku 的基础架构中可能存在更深层次的问题。
回答by Jonathan Poischen
- Delete bundle.js
- run node build.js
- commit and git push origin master
- git push heroku master
- 删除 bundle.js
- 运行节点 build.js
- 提交和 git push origin master
- git push heroku master
回答by Andrew David Brown
Had this issue also. Changes to CSS made in Github repo were not reflected in heroku app. Hard reload of the app solved problem.
也有这个问题。在 Github 存储库中对 CSS 所做的更改未反映在 heroku 应用程序中。硬重新加载应用程序解决了问题。