简体   繁体   English

如何从Heroku中检索git存储库?

[英]How do I retrieve a git repository from Heroku?

I created an app and deployed it to Heroku, but I didn't have a github git repo (I know really bad idea!) and my local git repo has been deleted (just plain stupidity here). 我创建了一个应用程序并将其部署到Heroku,但我没有github git repo(我知道真的很糟糕!)并且我的本地git repo已被删除(这里只是简单的愚蠢)。 So I have no copies of my source. 所以我没有我的来源副本。 I need to make some updates and the only thing I can think of is doing a checkout from Heroku. 我需要做一些更新,我唯一能想到的是从Heroku进行结账。

Is there a way to do a checkout from Heroku? 有没有办法从Heroku结帐? Is there a way I can retrieve the source from the Heroku git repo? 有没有办法从Heroku git repo中检索源代码?

您只需要通过heroku app克隆git repo链接。

git clone git@heroku.com:<YOUR_APP>.git

In 2014, you could do 在2014年,你可以做到

heroku git:clone -a <your-app-name>

Documentation 文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM