[英]Heroku and Git are not updating, pushing, or pulling properly
I'm literally falling apart at the seams with angry, nervous laughter. 我真的在生气而紧张的笑声中崩溃了。 Someone PLEASE help me... 请有人帮我...
Screenshots: https://medium.com/p/4ff0a5af7f53 截图: https : //medium.com/p/4ff0a5af7f53
git status
, I am on working branch Redesign
with nothing to commit and a clean working directory. 运行git status
,我正在Redesign
工作分支上,没有要提交的内容,并且目录干净。 rails server
and navigate to localhost:3000
. 运行rails server
并导航到localhost:3000
。 Yay pretty website, let's just denote it with a variable ABC 耶漂亮的网站,让我们用一个可变的ABC来表示它 git push heroku Redesign:master
, it tells me everything is up to date 运行git push heroku Redesign:master
,它告诉我一切都是最新的 Rollback
and run a git pull
from Heroku 好的,所以我要对此加以幽默,我将导航到一个新分支“ Rollback
并从Heroku运行git pull
Rollback
branch I'm going to run rails server
expecting to see the XYZ old site that I just pulled from Heroku 现在,在此Rollback
分支上,我将运行rails server
期望看到我刚刚从Heroku中拉出的XYZ旧站点 By the way running the push with --force
does not help. 顺便说一句,用--force
运行推无济于事。 When I run heroku releases there is no record of this push. 当我运行heroku版本时,没有此推送的记录。
WHAT IS HAPPENING???????? 怎么了????????
Sorry if I seem desperate... I've been at this for 2 hours 对不起,如果我看上去很绝望...我已经在这里待了两个小时了
Ok this was dumb of me, @Chris I think you were going to stumble upon it. 好吧,这对我来说是愚蠢的,@克里斯,我想你会偶然发现它的。 I had done a heroku rollback
and didn't realize that when you rollback on Heroku, the git repo head commit doesn't change. 我做了一个heroku rollback
,但没有意识到当您在Heroku上回滚时,git repo head提交不会改变。
This is the thread that solved it: heroku rollback didn't update the HEAD remote branch, did it? 这是解决它的线程: heroku回滚没有更新HEAD远程分支,对吗?
git add .
git commit -a -m "Message"
Have you performed these before you try and push? 在尝试推动之前,您是否执行过这些操作? You have to update your local git repo before sending to Heroku 您必须先更新本地git repo,然后才能发送到Heroku
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.