Question

I just ran:

$ heroku fork -a oldapp newclonedapp

and it worked fine and runs etc. Now I want to pull the code down to work on it [I realize heroku is not for version control and I usually use github for this but in this case I need to get the code from the clone] and when I try:

$ heroku git:clone -a newclonedapp

I get:

warning you have appeared to have cloned an empty directory

and the new newclonedapp directory is empty indeed.

what am I doing wrong?

Was it helpful?

Solution

You're not doing anything wrong, it's a known issue of fork that it doesn't clone the source app repository. Until the issue is resolved, you'll need to manually clone the source repository. Here's how I'd do it:

$ git clone git@heroku.com:oldapp.git -o old newclonedapp
$ cd newclonedapp
$ heroku git:remote -a newclonedapp
$ git push heroku master

Basically, you clone the original repo to a new app directory, setup the heroku git remote and push to it to populate the new app repo.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top