Skip to content

Instantly share code, notes, and snippets.

@delagoya
Forked from reinh/hack.sh
Created October 10, 2008 14:58
Show Gist options
  • Save delagoya/16068 to your computer and use it in GitHub Desktop.
Save delagoya/16068 to your computer and use it in GitHub Desktop.
git shell script to pull changes from remote into current branch
#!/bin/sh -x
# git name-rev is fail
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