February 2010 Archives

Push to Heroku from a Branch of Your Local Git Repository (other than master)

We spent some time searching for a bit of git hocus pocus to solve this one…here’s the spell:

git push heroku <branch_name>:master

Our situation: 1. A production server 2. A staging server 3. A sandbox server

We have a branch in our git repo for the sandbox server & needed to be able to push straight from that, not from master. The little colon did the trick!

A couple resources: * http://www.mail-archive.com/heroku@googlegroups.com/msg04039.html * http://suitmymind.com/blog/2009/06/02/deploying-multiple-environments-on-heroku-while-still-hosting-code-on-github/

Continue Reading…

Posted by Liah on Feb 24, 2010

Git Workshop Retrospective

I was elated with how well the workshop was received. All 22 open spots were taken on meetup.com and we had 100% of those people show up! There were still around 12 people on the waiting list. Five women participated (including me), making the gender balance 23% female…not too shabby! Everyone was snug in our small space at Blazing Cloud, but it worked.

I think that the hands on approach was very effective. First I had everyone pair off and work together to research one of the following:

  1. when to use cherry-pick
  2. when to use checkout (branch & files)
  3. when to use merge
  4. when to use reset
  5. when to use revert
  6. when to use rebase
  7. when to use branch vs stash
  8. how to ignore files
  9. find as many ways to add & commit as you can (all the options & flags, what they do)
  10. how to delete files properly

Then each pair reported back with their findings. The discussion was great, made even better when Brian Colfer, my co-organizer & git expert came by and explained complex git concepts articulately.

We switched gears and each pair completed an exercise I prepared. All the materials for the exercise are online at gitworkshop.com. The scenario included a boss who barked out indecisive orders that gave us opportunities to git reset, git revert, git stash, git cherry-pick, git merge and git branch. I learned a ton creating the tutorial (spent at least 12 hours doing it…plenty of time to get a good grasp of git).

My impression was that the participants learned a lot and had a good time!

Continue Reading…

Posted by Liah on Feb 24, 2010

Git Workshop

I've been using git since I started learning Ruby in July 2009. I've gone through many of the more advanced topics - creating branches, checking them out & merging them is clear to me...that is until it isn't clear. Sometimes git does things I'm not expecting. So, I figured I'd host a little hands-on workshop to try to work out git intricacies. There is nothing like teaching a topic to learn it inside & out. More info about the workshop... Continue Reading…

Posted by Liah on Feb 20, 2010