Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: e04aeaeb9e
Fetching contributors…

Cannot retrieve contributors at this time

47 lines (31 sloc) 1.491 kb

Herogit: Git Love for Heroku

This plugin allows Heroku config information (credentials and app/branch mapping) to be stored in Git's config files. It brutally monkeypatches Heroku::Command::Auth and Heroku::Command::Base, so I'd love some help from anybody with experience writing better-behaved Heroku plugins.


I have a couple of personal Heroku projects, plus a fair number for work. I'm sick of editing ~/.heroku/credentials when I switch personas. Let's fix that. In your project repo:

git config --add
git config --add heroku.password 0mgponies

If these two git config entries exist, they'll be used instead of ~/.heroku/credentials.


I have two Heroku apps for a single work project; one for next (staging) and one for master (production). Since I also have multiple remotes pointing at Heroku, the command-line tool gets confused and asks me to supply --app manually.

$ heroku config
No app specified.
Run this command from app folder or set it adding --app <app name>

Lame. Let's fix it:

git config --add myapp-next
$ heroku config # totally works!

Add a<branchname> config entry for each branch you want to strongly associate with a Heroku app. Specifing --app still overrides this, natch.


heroku plugins:install git://


This work is hereby placed in the public domain.

Jump to Line
Something went wrong with that request. Please try again.