'pull from heroku gets empty git but there's an online site [duplicate]

Trying to retrieve old code for updating...

heroku git:clone -a appname 

creates empty dir...


So:

$ git clone https://git.heroku.com/appname.git
Cloning into 'appname'...
warning: You appear to have cloned an empty repository.

$ git remote -v
heroku  https://git.heroku.com/appname.git (fetch)
heroku  https://git.heroku.com/appname.git (push)

$  git pull https://git.heroku.com/appname.git heroku
fatal: couldn't find remote ref heroku

git pull https://git.heroku.com/appname.git
fatal: couldn't find remote ref HEAD

login via heroku bash and "ls -la" i can check there is no .git folder in my app but it works online and i should have pushed it tru heroku cli as theres no other way ( i dont use public github).

It's a django app.

Also tried without understanding well an answer i found:

git fetch -vv --all
Fetching heroku
Fetching here
fatal: couldn't find remote ref refs/heads/heroku
error: could not fetch here

git reset --hard HEAD

which just resets a commit i had locally without fetching remote git

 git remote set-head heroku -a
error: Cannot determine remote HEAD

remote update silent goes on

$ git remote update
Fetching heroku
$

*App was in maintenance mode, which shouldnt affect but tried by enabling it and do everything again


edit: i'm diving into this which might or not have been the case heroku help for cloned empty link

heroku git:remote -a appname

it does set remote but i don't have the correct name of the app template used in case it was tru button deploy, which i don't know, but i doubt was the case. So it's not the same case as Heroku "cloned an empty repository" message for a repository that isn't empty

**edit2: this solution by heroku just retrieves the original template, but not the changes that you would have developed further from it


It probably could only be resolved with the heroku support which im waiting answer.

Or with this hack to retrieve the files https://code-examples.net/es/q/1478abd



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source