Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

DON'T YOU KNOW WHO I AM?!

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 README.markdown
Octocat-spinner-32 init.rb
README.markdown

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.

Credentials

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 heroku.email jbarnette@gmail.com
git config --add heroku.password 0mgponies

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

Apps

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 heroku.app.next myapp-next
$ heroku config # totally works!

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

Installation

heroku plugins:install git://github.com/jbarnette/herogit.git

License

This work is hereby placed in the public domain.

Something went wrong with that request. Please try again.