Skip to content

Latest commit

 

History

History
101 lines (68 loc) · 1.55 KB

heroku.md

File metadata and controls

101 lines (68 loc) · 1.55 KB
title category intro keywords
Heroku multiple accounts
services
How to use multiple heroku accounts, branches, fork heroku apps
Heroku
Heroku cli
PaaS
Multiple accounts
Fork

Branches

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

$ git remote rename heroku heroku-staging

Multiple accounts

Install official plugin

{: .-intro}

$ heroku plugins:install heroku-accounts

Add new account

$ heroku accounts:add personal
Enter your Heroku credentials.
Email: [email protected]
Password: ******

List accounts

$ heroku accounts

Switch to a given account

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

Copy env

Export app env

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

Push to another app

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

Fork

Install deprecated plugin

{: .-intro}

$ heroku plugins:install heroku-fork

Setup on mac

Install heroku CLI

brew tap heroku/brew && brew install heroku

See also

References

{: .-intro}