Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to clone a specific heroku version?

Tags:

git

clone

heroku

I have several versions of a website on Heroku, I know for downloading I have to do:

heroku git:clone -a myapp

Can I download a specific version? Like v24?

like image 527
Antonio Morales Avatar asked Nov 27 '25 06:11

Antonio Morales


1 Answers

Once you have cloned the repo, you can reset or checkout any version you like.

To reset the branch to a particular commit, removing all commits above it, you can do:

git reset --hard <commit-id>

To just checkout your code at a particular commit, you can do:

git checkout <commit-id>

I would suggest storing your code somewhere other than Heroku though. Heroku should only be used for deployment. You should give GitHub a try if you haven't already.

like image 199
jordelver Avatar answered Nov 29 '25 21:11

jordelver



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!