Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to retrieve your source code from heroku?

Tags:

git

heroku

Once you have uploaded your source code to Heroku, is it possible to download it from there if necessary such as in the case of a failure of your local disk?

Because of heroku's integration with git, I would assume this might be possible at least in theory.

like image 296
archibald Avatar asked Sep 04 '09 00:09

archibald


People also ask

Is my code public on Heroku?

No, the code is not public. Do not confuse GIT with GITHUB. When you deploy to heroku the repository is private to the owner and the added collaborators.

What is Heroku clone?

This command creates a copy of the Heroku-hosted repository that contains your app's source and complete repository history. It also includes a heroku Git remote to simplify future pushes. You cannot clone your app's source from Heroku if you deploy your app with any method besides git push .


1 Answers

Just go to https://dashboard.heroku.com/apps/YOUR_APP_NAME/deploy/heroku-git.

Install the Heroku Toolbelt

Download and install the Heroku Toolbelt

If you haven't already, log in to your Heroku account and follow the prompts to create a new SSH public key.

$ heroku login 

Clone the repository

Use Git to clone YOUR_APP_NAME's source code to your local machine.

$ heroku git:clone -a YOUR_APP_NAME $ cd YOUR_APP_NAME 

Deploy your changes

Make some changes to the code you just cloned and deploy them to Heroku using Git.

$ git add . $ git commit -am "make it better" $ git push heroku master 
like image 144
hzitoun Avatar answered Sep 23 '22 01:09

hzitoun