簡體   English   中英

我如何將提交推送到已經從本地存儲庫推送到 git 的 heroku?

[英]How could i push a commit to heroku that has already been pushed to git from local repo?

我遇到了這種奇怪的情況...

我有一個提交推送到 github ......

然后提交從 git status 中消失......

如何將相同的文件提交給heroku?

任何幫助,將不勝感激。

首先將 heroku 遠程添加到本地 git。

git remote add <your heroku git url>

<your heroku git url>替換為您實際的 heroku git url,您可以從 heroku 儀表板上的設置選項卡中找到它,它看起來像這樣: https://git.heroku.com/app-name.git : https://git.heroku.com/app-name.git

添加 heroku remote 后,您只需通過以下方式推送最新提交:

git push heroku master

用你想要推送的任何分支替換master ,通常它是master

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM