在Heroku我有一个生产应用程序,我知道有一个临时应用程序:
$ heroku list
=== My Apps
testivate
testivate-staging
Run Code Online (Sandbox Code Playgroud)
我有每个遥控器:
$ git remote -v
heroku git@heroku.com:testivate.git (fetch)
heroku git@heroku.com:testivate.git (push)
staging git@heroku.com:testivate-staging.git (fetch)
staging git@heroku.com:testivate-staging.git (push)
Run Code Online (Sandbox Code Playgroud)
我走了几天,部署打破了我的生产应用程序,所以我用了heroku rollback,最后创建了我现在正在使用的暂存应用程序,并将我的代码推送到临时应用程序,大概是git push staging master.(这是几天前,但我很确定这就是我所做的.)
它现在都在我的临时应用程序上工作,所以我正在尝试将我的代码推送到我的生产应用程序.
但是,Heroku告诉我,我的生产应用程序已经是最新的:
$ git branch
* master
$ git status
# On branch master
nothing to commit (working directory clean)
$ git add .
$ git add -u
$ git commit -m "trying to commit"
# On branch master
nothing to commit (working directory clean)
$ git push heroku master
Everything up-to-date
$ git remote show staging
* remote staging
Fetch URL: git@heroku.com:testivate-staging.git
Push URL: git@heroku.com:testivate-staging.git
HEAD branch: master
Remote branch:
master tracked
Local ref configured for 'git push':
master pushes to master (up to date)
$ git remote show heroku
* remote heroku
Fetch URL: git@heroku.com:testivate.git
Push URL: git@heroku.com:testivate.git
HEAD branch: master
Remote branch:
master tracked
Local ref configured for 'git push':
master pushes to master (up to date)
Run Code Online (Sandbox Code Playgroud)
我知道Heroku是错误的,因为我的视图有一些明显的变化,你可以在我的本地代码和登台服务器上看到,但不能在我的实时制作应用程序上看到.
例如,比较"背"链接是正确这里我升级的应用程序,而不是在这里在我的生产应用程序.
如何让Heroku按我的意愿更新我的制作应用程序?
谢谢,
史蒂芬.
Sta*_*ers 16
你确定你指的是正确的分支吗?这是实际命令的语法:
git push heroku <the branch you wish to push>:<the branch on the heroku server you wish to push to>
Run Code Online (Sandbox Code Playgroud)
所以,如果你习惯了
git push heroku master
Run Code Online (Sandbox Code Playgroud)
并且你签出并提交除master之外的分支,运行git push heroku master将推送你未更改的master分支.相反,跑
git push heroku the_branch_i_changed:master
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5625 次 |
| 最近记录: |