[英]How could i push a commit to heroku that has already been pushed to git from local repo?
I encounter this weird situation...我遇到了这种奇怪的情况...
I have a commit pushed to github...我有一个提交推送到 github ......
then the commit disappears from git status...然后提交从 git status 中消失......
how can I commit that same file to heroku?如何将相同的文件提交给heroku?
any help would be appreciated.任何帮助,将不胜感激。
First add the heroku remote to your local git.首先将 heroku 远程添加到本地 git。
git remote add <your heroku git url>
replace <your heroku git url>
with your actual heroku git url, you can find it from settings tab of on your heroku dashboard, it looks something like this: https://git.heroku.com/app-name.git
将
<your heroku git url>
替换为您实际的 heroku git url,您可以从 heroku 仪表板上的设置选项卡中找到它,它看起来像这样: https://git.heroku.com/app-name.git
: https://git.heroku.com/app-name.git
once heroku remote is added, you can simply push the latest commit by:添加 heroku remote 后,您只需通过以下方式推送最新提交:
git push heroku master
replace master
with whatever branch you want to push, normally it is master
用你想要推送的任何分支替换
master
,通常它是master
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.