问题
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:
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 git@heroku.com:[APP].git
git remote add bitbucket ssh://git@bitbucket.org/[ACCOUNT]/[REPO].git
git push bitbucket master
来源:https://stackoverflow.com/questions/13300068/can-i-import-my-heroku-git-repo-into-bitbuket-and-how