Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save mileszs/108345 to your computer and use it in GitHub Desktop.
#!/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment