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

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

问题描述

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

  git@heroku.com:myapp.git 

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

解决方案

如果您使用的是heroku toolbelt:
$ b

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

heroku git:remote -a project



请参阅

积分: user101289 's解决方案



否则,如果您没有heroku toolbelt: 首先这样做:

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

然后执行此操作:

  git push heroku master 
heroku open


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

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.

解决方案

If you've heroku toolbelt:

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

heroku git:remote -a project

See this for more.

Credits: user101289's solution

Else if you don't have heroku toolbelt:

First do this:

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

Then do this:

git push heroku master
heroku open

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

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