Note that the procedure explained by berislavbabic is not recommended according to the following guide on Heroku's site: https://devcenter.heroku.com/articles/multiple-environments#managing-staging-and-production-configurations
You can read in detail there, but the recommendation is to keep the staging environment the same as the production environment and simply use heroku fork to copy from production to staging.