Clean git repo on Heroku

Install the Heroku Repo plugin and use it to reset the remote git repo.

First delete the git repo on the server:

> cd /my-project/
> heroku plugins:install heroku-repo
> heroku repo:reset

Then re-initialise your local git repo by deleting and recreating it:

> cd /my-project/
> rm -rf .git
> git init
> heroku git:remote -a <appname>

Where <appname> is name of your app in heroku.

The 2 repos (local and remote) should now be empty and in sync.

Leave a Comment

tech