Cloning a previous version on Heroku

I am new to Heroku. After clicking on the bad code on the server, I used heroku rollback to heroku rollback back to the previous version. Then I tried to clone this rollback to my computer with:

 git clone git@heroku.com :<project>.git <dir> 

Unfortunately, this clones a damaged head, not a rollback. Is there a way to actually clone a specific previous version?

+7
git clone heroku rollback
source share
1 answer

When you perform rollbacks, the head of your Heroku Git repository will no longer reflect the current state of your application. Check your releases:

 $ heroku releases Rel Change By When ---- ---------------------- ------------------- ------------- v52 Config add AWS_S3_KEY shanley@heroku.com 5 minutes ago v51 Deploy de63889 kendra@heroku.com 7 minutes ago v50 Deploy 7c35f77 katie@heroku.com 3 hours ago 

Values de63889 : Git commit shas. With their help, you can check what to do locally:

 git checkout de63889 
+12
source share

All Articles