问题描述
我在 Heroku 上有一个运行旧代码的应用程序.我做了一个小小的改变并承诺了改变.然后我跑了
I have an app on Heroku that is running old code. I've made a small change and committed the change. I then ran
git push heroku master
它会说
Fetching repository, done.
Everything up-to-date
但如果我去看看应用程序,它都是旧代码.大约 15 天前,我确实将站点恢复到 Heroku 中的另一个版本,但从那时起推送了更新,并且它们起作用了.
But if I go and look at the app, it's all old code. I did revert the site back to another version in Heroku about 15 days ago, but pushed updates to it since then and they worked.
为什么 heroku 没有从我的 github 存储库中获取最新的文件?有没有办法重置应用程序并再次从github推送文件?我在数据库中有生产数据,所以我不想碰它.
Why is heroku not getting the most current files from my github repository? Is there a way to just reset the app and push the files from github again? I have production data in the database so I do NOT want to touch it.
提前致谢!!
推荐答案
请确认您当前的分支是 master.
Kindly confirm your current branch is master.
git branch
如果指针没有指向master,则检查到master分支
If the pointer is not pointing the master, then check out to master branch
git checkout master
提交您的更改并尝试推送到 heroku
Commit your changes and try to push to heroku
git commit -am "xxxyyzzz"
git push heroku master
这篇关于git push heroku master 说“一切都是最新的",但该应用程序不是最新的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!