I'm having problems retrieving the current application code from heroku. I think it is messed up at Heroku but their support hasn't replied yet (3 days and counting). But maybe someone else has an idea what might be wrong or if there is something else I could try.
terminal output:
$ heroku git:clone -a APPNAME
Cloning from app 'APPNAME'...
Cloning into 'APPNAME'...
warning: You appear to have cloned an empty repository.
$ git pull
Your configuration specifies to merge with the ref 'master'
from the remote, but no such ref was fetched.
.git/config looks fine but the local directory has no branches or other content.
Update The issue was indeed a corrupt git repository. Heroku support re-initialized the repository which fixed all problems.
You can use heroku slog download. Please refer https://help.heroku.com/FZDDCBLB/how-can-i-download-my-code-from-heroku.
First, install the heroku-slugs CLI plugin with
heroku plugins:install heroku-slugs
, then run:
heroku slugs:download -a APP_NAME
This will download and compress your slug into a directory with the app
name.
Extracted from https://help.heroku.com/XOBUHLKQ/why-do-i-see-a-message-you-appear-to-have-cloned-an-empty-repository-when-using-heroku-git-clone
Why 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.
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 cd into 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With