Cleaning up scripts to only include useful stuff.
[git-central.git] / scripts / pull
1 #!/bin/sh
2
3 branch_name=$(git symbolic-ref --quiet HEAD)
4 if [[ $? -ne 0 ]] ; then
5         echo "not on a branch"
6         exit 1
7 fi
8
9 branch_name=${branch_name/refs\/heads\//}
10
11 git fetch
12 if [[ $? -ne 0 ]] ; then
13         exit $?
14 fi
15
16 GIT_EDITOR=: git rebase -p -i "origin/$branch_name"
17