Heroku multiple accounts

How to use multiple heroku accounts, branches, fork heroku apps,

A cheatsheet by @nathan-appere|Refreshed 7 months ago.Refresh|View source on Github

Add a remote for an existing app

Add a remote for an existing app

$ heroku git:remote -a app-name

Sets git remote heroku to https://git.heroku.com/app-name.git

Renaming a remote

Renaming a remote

$ git remote rename heroku heroku-staging

Install official plugin

Install official plugin

$ heroku plugins:install heroku-accounts

Add new account

Add new account

$ heroku accounts:add personal
Enter your Heroku credentials.
Email: david@heroku.com
Password: ******

List accounts

List accounts

$ heroku accounts

Switch to a given account

Switch to a given account

$ h![](http://)eroku accounts:set personal

Export app env

Export app env

$ heroku config -s -a existing-heroku-app > config.txt

Push to another app

Push to another app

$ cat config.txt | tr '\n' ' ' | xargs heroku config:set -a new-heroku-app

Install deprecated plugin

Install deprecated plugin

$ heroku plugins:install heroku-fork

Install heroku CLI

Install heroku CLI

brew tap heroku/brew && brew install heroku