Skip to content

Instantly share code, notes, and snippets.

@mileszs
Created May 7, 2009 20:42
Show Gist options
  • Select an option

  • Save mileszs/108353 to your computer and use it in GitHub Desktop.

Select an option

Save mileszs/108353 to your computer and use it in GitHub Desktop.
#!/bin/sh -x
#
# Use together with 'hack' from a feature branch when you're
# ready to push the changes into master, and to the origin.
#
# $ hack && ship
#
# Name this 'ship', 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 merge ${CURRENT}
git push origin master
git checkout ${CURRENT}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment