Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# Instructions:
# Make sure you have the Heroku CLI installed and configured (
# Replace source-heroku-app and target-heroku-app with your app name
# 1. Export existing app’s variables to config.txt.
heroku config -s -a source-heroku-app > config.txt
# 2. Review and push to another app
cat config.txt | tr '\n' ' ' | xargs heroku config:set -a target-heroku-app
# 3. Remove the config.txt file (especially if it holds sensitive information such as DB credentials)
rm config.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment