mileszs
5/7/2009 - 8:34 PM

gistfile1.sh

#!/bin/sh -x
#
# Use together with 'ship' from a feature branch when you're
# ready to push the changes into master, and to the origin.
#
#   $ hack && ship
#
# Name this 'hack', place it in your path, make it executable
#
# Origin: http://reinh.com/blog/2008/08/27/hack-and-and-ship.html

CURRENT=`git branch | grep '\*' | awk '{print $2}'`
git checkout master
git pull origin master
git checkout ${CURRENT}
git rebase master