Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trying to heroku git:clone after heroku fork yields an empty repository

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?

like image 524
user2284821 Avatar asked Sep 11 '13 20:09

user2284821


People also ask

Can we clone an empty repository?

An empty repository contains no files. It's often made if you don't initialize the repository with a README when creating it. On GitHub.com, navigate to the main page of the repository. To clone your repository using the command line using HTTPS, under "Quick setup", click .


1 Answers

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 [email protected]: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.

like image 147
Ryan Daigle Avatar answered Oct 20 '22 03:10

Ryan Daigle