Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
Create a local tracking branch of your heroku/phpfog deployment
Create remote called heroku
> git remote add heroku
create a local tracking branch called heroku
> git checkout -b heroku -t heroku/master
This will checkout the last revision you deployed to Heroku.
Now tell git to push the heroku branch to heroku/master
> git config remote.heroku.push heroku:master
You can then make changes on this branch independently of your master
and when you're ready to deploy to heroku just do this on your local
heroku branch
> git commit -m "Some minor bug fixing"
> git push heroku
... Will deploy ...
You can work on features on master:
> git checkout master
> # hack away
> git commit -a -m "My awesome new feature"
To deploy to Heroku
> git checkout heroku
> git merge master
> git push heroku
You can use the same technique to have multiple heroku apps for the one codebase,
e.g. a staging and production version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.