推到heroku,但没有改变应用程序? [英] pushed to heroku but no changes to app?
问题描述
我使用以下三个命令将更改推送到已经存在的应用程序,但更改没有被反映出来
$ git add。
$ git commit -mchanges
#在分支大师
#你的分支在2次提交之前领先于origin / master。
$ git push heroku master
我得到:
至git@heroku.com:sleepy-oasis-7771.git! [被拒绝] master - > master(非快速转发)
错误:未能将某些文件推送到'git@heroku.com:sleepy-oasis-7771.git'
为了防止您失去历史记录,正向更新被拒绝
在再次推送之前合并远程更改(例如'git pull')。有关详细信息,请参阅git push --help的快速转发部分的
'注意事项。
并且没有变化反映在应用程序中
您的推送是! [拒绝]
。
消息指出:
为了防止您丢失历史记录,拒绝非快进更新
在再次推送之前合并远程更改(例如'git pull')。有关详细信息,请参阅git push --help的快速转发部分的
'注意事项。
这表示您可以在本地机器上看到更多文档,或者在线。同样,正如消息所示, git pull
(及其产生的合并)将解决此问题。
一避免此问题的方法是使用重建工作流程而不是合并工作流程。在功能分支中进行开发,当你准备好合并时,拉大师,重新绑定功能分支,重新运行测试套件,然后然后合并。
另外,请阅读您的错误消息。
I used the following three commands to push the changes to an already existing app but the changes are not being reflected
$ git add .
$ git commit -m "changes"
# On branch master
# Your branch is ahead of 'origin/master' by 2 commits.
$ git push heroku master
And I get:
To git@heroku.com:sleepy-oasis-7771.git ! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@heroku.com:sleepy-oasis-7771.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
and no changes are reflected in the app
Your push was ! [rejected]
. That's why no changes take effect.
As the message indicates:
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
This refers you to further documentation, visible on your local machine or online. Again, as the message indicates, a git pull
(and its resulting merge) will fix this issue.
One way to avoid this problem is by using a rebase workflow instead of a merge workflow. Do your development in a feature branch, and when you're ready to merge, pull master, rebase the feature branch, re-run your test suite, and then merge.
Also, please read your error messages.
这篇关于推到heroku,但没有改变应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!