Trying to heroku git:clone after heroku fork yield

2019-01-31 09:23发布

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?

1条回答
够拽才男人
2楼-- · 2019-01-31 10:01

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.

查看更多
登录 后发表回答