我使用GitHub的“Deploy to Heroku”按钮创建了一个应用程序。由于git项目已更改,我该如何使用新的上游提交更新现有实例?
git clone https://github.com/USER/REPO.git
git checkout v0.7.3
git remote add heroku https://git.heroku.com/APP-NAME.git
git push -f heroku master
heroku git:clone -a app-name
我最初尝试这样做,然后将原始存储库作为远程存储库添加并合并更改,但我遇到了一些问题,我不想弄清楚。
Deploy
> Manual deploys
部分Deploy Branch
截图
以下是一个屏幕截图显示用户界面:
注意:正如Tim Malone所提到的那样,这仅适用于您自己的存储库,但可以通过创建一个分叉来解决,就像Skyost所提到的那样。# Clone app if you haven't already
heroku git:clone -a appname
# Get latest app
git remote add REPO https://github.com/USER/REPO.git
git branch -b REPO REPO/master
# Delete master
git branch -D master
# Remake it with latest
git checkout -b master
# And force push it to heroku
git push -f heroku master
master
,您可以尝试以下操作:git pull heroku master
heroku
指向仓库中适当的位置。