Yesterday, I posted a question on how to clone a Git repository from one of my machines to another, How can I \'git clone\' from another machine?.
I am now
I just ran into this problem with a deployment git repository on Heroku.
I don't know why Heroku has a non-bare repository on their side, but as a workaround I was able to reset the remote repository, and reupload.
You shouldn't use Heroku's copy of your repository as your only git repository for collaboration, but just in case, I'll say clearly: Do not do this unless you are sure you have a full copy of your repository stored securely somewhere other than Heroku. Doing a reset will delete the repository contents.
To reset:
Install the heroku-repo plugin if you haven't already.
heroku plugins:install https://github.com/heroku/heroku-repo.git
Do the reset, which deletes the repository and creates a new, empty one
heroku repo:reset
Push to your Heroku remote as you normally would; it will reupload everything.