Saturday, December 26, 2009

Staging on heroku

I have recently started using Heroku for my small url shortening project called and needed a simple way for staging the code before pushing changes to the production repository.

It is as easy as it gets thanks to git which allows you to maintain connection with many remote repositories.
From within my tyciurl repository I created a new app called tyciurl-staging by calling heroku command line tool. It adds entry for a new remote in your .git/config file and called it "heroku". I renamed to "staging" to better indicate the purpose of this repo. I also renamed my first remote to "live". By doing this I have to explicitly say which remote I want to push my changes to (because I don't have origin any more which is default remote when issuing commands such as git push). This is a small price though for avoiding a mistake of deploying not fully tested changes to production.

No comments:

Post a Comment