0

Sorry for the basic question, but how can I fork an Heroku app to the local machine? I deployed a simple Django app, added some data to the app online and now I want to fork the app to my friend's laptop so he can continue to fill in the data for me (let say he don't have the internet). I tried heroku fork but it does not work, the forked repository doesn't have the data I added before and the account that I created for my friend...

  • Did you git push (https://devcenter.heroku.com/articles/git#deploying-code) your code before the heroku fork? – VonC Sep 04 '16 at 07:24
  • Oh you right, I'm such a dumb. Now for every time I do ```git push```, I have to ```heroku fork``` first right? –  Sep 04 '16 at 07:56
  • `heroku fork` should be done once. See my answer. – VonC Sep 04 '16 at 08:07

1 Answers1

0

I tried heroku fork but it does not work, the forked repository doesn't have the data I added before

That data must be pushed before:

git push heroku master

Then a fork can be done.
Note that forking an application doesn’t automatically create a new git remote in your current project.
Use heroku info to retrieve the Git URL of the new application and the set it manually.

Once you have the git url for the fork, you can clone it, and add an upstream remote url referencing the source heroku Git repo.
Your friend can then update his/her local clone of that fork without having to heroku fork each time.

Community
  • 1
  • 1
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283