Reputation: 1164
I referenced this awesome thread from the following to fork my Heroku app and clone the github repo to have two seperate github repo's and Heroku app's for production and development.
Trying to heroku git:clone after heroku fork yields an empty repository
$ git clone [email protected]:oldapp.git -o old newclonedapp
$ cd newclonedapp
$ heroku git:remote -a newclonedapp
$ git push heroku master
I then manually moved my folder newcloneapp
into its own directory. Regardless, I still get the following errors:
! Multiple apps in folder and no app specified.
! Specify app with --app APP.
How can I fix this ?
Upvotes: 1
Views: 270
Reputation: 13067
As the error message says, include --app newcloneapp
in the command you are running to ensure it works with the right heroku application.
By copying the newcloneapp
folder into its own directory, you are still retaining the git config for the application; hence the multiple heroku apps in this folder.
You can remove one of the applications by editing the .git/config
file and removing one section with the url = [email protected]:your-app-name.git
line.
In one of my heroku apps, I have the following config in the .git/config
file:
[remote "staging"]
url = [email protected]:my-app-name.git
fetch = +refs/heads/*:refs/remotes/staging/*
[remote "production"]
url = [email protected]:my-app-name.git
fetch = +refs/heads/*:refs/remotes/staging/*
With this in place, I can push to both staging
and production
from the same repo. Looks like you need only one app in the folder; so you should have only one of the above sections.
Upvotes: 2