我可以将我的heroku git仓库导入bitbuket吗?如何? [英] Can I import my heroku git repo into bitbuket? and how?

查看:178
本文介绍了我可以将我的heroku git仓库导入bitbuket吗?如何?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在和Heroku合作,我想从Heroku获得最新版本的代码到另一台机器上。



我了解到,建议使用GitHub或BitBucket来获得适当的远程资源库。



I决定尝试BitBucket。



在创建我的帐户时,它要求提供我的git repo的旧URL。由于我的机器已经死机,我希望填写heroku网址,但这并不奏效。



任何想法如何进行?

这个想法是,我可以从任一台机器(当我的笔记本电脑来自修复)。

解决方案

您可以简单地将Heroku存储库克隆到本地计算机。然后将BitBucket添加为远程并将代码推送到那里。



在应用的设置页面找到Heroku repo url

https://dashboard.heroku.com/apps/ [APP] / settings

  git clone git@heroku.com:[APP] .git 
git remote add bitbucket ssh://git@bitbucket.org/ [ACCOUNT] / [REPO] .git
git push bitbucket主


My laptop died and I need to code from another computer.

I am working with Heroku and I want to get the latest version of code from Heroku to another machine.

I understood that it is very recommended to get a proper remote repository using GitHub or BitBucket.

I decided to try BitBucket.

While creating my account, it asks for the old URL of my git repo. Since my machine is dead, I was hoping to fill in the heroku URL but that didn't work.

Any ideas how to proceed?

The idea is that I could pull and push my changes from either machines (when my laptop comes from repair).

解决方案

You can simply clone your Heroku repository to your local machine. Then add BitBucket as a remote and push the code there.

Find out the Heroku repo url on the settings page of your app

https://dashboard.heroku.com/apps/[APP]/settings

git clone git@heroku.com:[APP].git
git remote add bitbucket ssh://git@bitbucket.org/[ACCOUNT]/[REPO].git
git push bitbucket master

这篇关于我可以将我的heroku git仓库导入bitbuket吗?如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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