Why do I see a message 'You appear to have cloned an empty repository' when using `heroku git:clone`?
You've deployed an application to Heroku and when you attempt to clone the project using
heroku git:clone you receive the error 'You appear to have cloned an empty repository'
This error message occurs when deploys to your application have been made via our platform API - typically these are deploys from a Heroku Button click.
You can easily link a Heroku Button app to a repo so you can make changes to the source and deploy it again.
- Deploy the app with Heroku Button and remember the app name that you created.
- Go back to where the Heroku Button was displayed and copy it's underlying URL eg https://heroku.com/deploy?template=https://github.com/jamesward/heroku-connect-phone-change
- Now extract the https://github.com part so from the above example you'd be left with https://github.com/jamesward/heroku-connect-phone-change
- Clone the repo with
heroku git:clone -a <YOUR-APP-NAME>- it will be reported as empty - that's ok
cdinto the project and add a git remote pointing at the original source,
git remote add origin https://github.com/jamesward/heroku-connect-phone-change
- pull from the remote origin
git pull origin master
You will now have the code for the deployed application and you can make changes to it locally and deploy it back to Heroku.