Git Cloning Existing Heroku Applications
Last updated 18 January 2019
A Heroku app’s Git repository is intended for deployment purposes only. Cloning from this repository is not officially supported as a feature and should be attempted only as a last resort. Do not use this repository as your app’s canonical “origin” repository. Instead, use your own Git server or a version control service such as GitHub.
If necessary, you might be able to clone your app’s source from its Heroku Git repository using the
heroku git:clone command:
$ heroku git:clone -a myapp
myapp with the name of your app.
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. Other deployment methods do not update your app’s Heroku Git repo, causing
heroku git:clone to return an empty repository. These other deployment methods include: