Skip to content

Instantly share code, notes, and snippets.

@verschuur
Last active July 1, 2019 10:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save verschuur/50107320d58f6fb8683e56b9e9d9890b to your computer and use it in GitHub Desktop.
Save verschuur/50107320d58f6fb8683e56b9e9d9890b to your computer and use it in GitHub Desktop.
# Instructions:
# Make sure you have the Heroku CLI installed and configured (https://devcenter.heroku.com/articles/heroku-cli)
# 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