We can make an exact copy of our current application using the heroku fork
command. This copies our application code, add-ons, databases, and configuration variables over to another application. If all of our application's third-party services are Heroku add-ons, creating a fork would cover everything we need to do to get another environment up and running quickly.
Let's get started by opening up a terminal and navigating to the Heroku application that we'd like to fork. We'll create our forked application using the CLI by performing the following steps:
To fork the current directories' application, we will use the
fork
command along with our new application's name:$ heroku fork new-applications-name Creating fork new-applications-name... done Copying slug... done Adding librato:development... done Adding newrelic:stark... done Adding rollbar:free... done Adding sendgrid:starter... done Adding heroku-postgresql:dev... done Adding pgbackups...