Skip to content

Instantly share code, notes, and snippets.

@epichub
Created March 31, 2011 08:52
Show Gist options
  • Save epichub/896055 to your computer and use it in GitHub Desktop.
Save epichub/896055 to your computer and use it in GitHub Desktop.
➜ ~ cat ~/local/bin/hack.sh
#!/bin/sh -x
# hack: Merge the latest changes from the master branch into your current branch
ref=$(git symbolic-ref HEAD 2> /dev/null) || exit 0
CURRENT="${ref#refs/heads/}"
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