简体   繁体   English

我如何将提交推送到已经从本地存储库推送到 git 的 heroku?

[英]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.

相关问题 如果已经运行了来自其他分支的更高版本的迁移,那么如何在Heroku上运行从Git分支进行的迁移? - How does a migration from a Git branch get run on Heroku if a later migration from a different branch has already been run? 如何将子树从本地分支推送到heroku master - How to git push subtree from a local branch to heroku master 无法将 git 回购推送到 Heroku - Cannot push git repo to Heroku 如何排除本地表schema_migrations中的数据以将其推送到Heroku DB? - How do I exclude data from local table schema_migrations from being pushed to Heroku DB? 从Subversion过渡到Git,我如何优雅地推送到heroku? - Transitioned from Subversion to Git, how do I push to heroku gracefully? 无法使用git push heroku master推送到Heroku(无法从远程存储库读取) - Can't push to Heroku using git push heroku master (Could not read from remote repository) git push heroku master 错误:无法读取 - git push heroku master error: Could not read 从Git推送到Heroku无效 - Push from Git to Heroku not working 将远程heroku存储库添加到我现有的本地存储库后,无法推送到heroku - Cannot push to heroku after adding a remote heroku repo to my existing local repo Heroku(和类似的服务):克隆,提交和推送到Git Repository - Heroku (and similar services): clone, commit and push to Git Repository
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM