如何将我的 repo 附加到 heroku 应用程序 [英] How to attach my repo to heroku app

查看:19
本文介绍了如何将我的 repo 附加到 heroku 应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个 heroku 应用程序,然后我的机器崩溃了.我有一台新机器.如何将我现有的应用程序附加到 heroku 应用程序.当我访问 heroku 页面时,我的应用程序的 url 是这样的

I create a heroku app and then my machine crashed. I have a new machine. How do I attach my existing app to heroku app. When I visit heroku page the url for my app is like this

git@heroku.com:myapp.git

我无法克隆这个应用程序,因为我已经拥有来自 github 的 myapp.所以我需要将 heroku 作为远程添加到我现有的 github 应用程序中.任何人都知道语法.

I can't do clone this app because I already have myapp from github. So I need to add heroku as remote to my existing github app. Anyone knows the syntax.

推荐答案

如果你有 heroku 工具带:

如果您使用的是 Heroku Toolbelt,则较新的语法是

If you're using the Heroku Toolbelt, the newer syntax is

heroku git:remote -a 项目

请参阅了解更多信息.

积分:user101289 的解决方案

否则,如果您没有 heroku 工具带:

首先这样做:

git remote add heroku git@heroku.com:{heroku-app-name}.git

然后这样做:

git push heroku master
heroku open

这篇关于如何将我的 repo 附加到 heroku 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆