Skip to content

Instantly share code, notes, and snippets.

@gtarun
Last active August 7, 2023 21:55
Show Gist options
  • Save gtarun/acea65c7a07cb8bdb63ff04ca65ac9f4 to your computer and use it in GitHub Desktop.
Save gtarun/acea65c7a07cb8bdb63ff04ca65ac9f4 to your computer and use it in GitHub Desktop.
Heroku copy config vars from one app to another app
FYI much quicker to set them all in one heroku config:set a=b c=d etc
If you prefer a manual review and you do have bash/zsh:
heroku config -s -a source-heroku-app > config.txt
Now review config.txt and remove any unwanted config lines
cat config.txt | tr '\n' ' ' | xargs heroku config:set -a target-heroku-app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment