Antonio Morales
Antonio Morales

Reputation: 1074

Is it possible to clone a specific heroku version?

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?

Upvotes: 3

Views: 3166

Answers (1)

jordelver
jordelver

Reputation: 8432

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.

Upvotes: 3

Related Questions