来自heroku的Git结账 [英] Git checkout from heroku
问题描述
我想用我部署到heroku的代码刷新我的本地代码库,并且它正在运行。
I would like to "refresh" my local codebase with the code I have deployed to heroku and that is currently running.
我做了一个
git pull heroku master
<并且得到了一条消息,说明一切都是最新的。然后我尝试了
And reveived a message saying that everything is up to date. I then tried
git checkout master
希望这会覆盖Heroku上可用的代码的本地副本。然而,这没有奏效。如何获得我部署到Heroku的代码?
Hoping that this would overwrite my local copy of the code with what is available on Heroku. However this did not work. How do I "get" my code that is deployed to Heroku?
推荐答案
如果您希望您的本地主分支完全反映heroku中的当前内容(也许您的本地副本不正确地分歧),那么您可以只用
It's just a git remote like any other. If you want your local master branch to reflect exactly what's currently in heroku (maybe your local copy diverged incorrectly), you can just
git fetch heroku
git reset --hard heroku/master
这篇关于来自heroku的Git结账的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!