3
votes

My laptop died and I need to code from another computer.

I am working with Heroku and I want to get the latest version of code from Heroku to another machine.

I understood that it is very recommended to get a proper remote repository using GitHub or BitBucket.

I decided to try BitBucket.

While creating my account, it asks for the old URL of my git repo. Since my machine is dead, I was hoping to fill in the heroku URL but that didn't work.

Any ideas how to proceed?

The idea is that I could pull and push my changes from either machines (when my laptop comes from repair).

1

1 Answers

5
votes

You can simply clone your Heroku repository to your local machine. Then add BitBucket as a remote and push the code there.

Find out the Heroku repo url on the settings page of your app

https://dashboard.heroku.com/apps/[APP]/settings

git clone [email protected]:[APP].git
git remote add bitbucket ssh://[email protected]/[ACCOUNT]/[REPO].git
git push bitbucket master