Skip to content

Instantly share code, notes, and snippets.

@m4rr
Created May 16, 2019 13:55
Show Gist options
  • Save m4rr/1d1992eea88292dd01a0c8ee2628f05b to your computer and use it in GitHub Desktop.
Save m4rr/1d1992eea88292dd01a0c8ee2628f05b to your computer and use it in GitHub Desktop.
m4rr zshrc to view pull requests
gpr() {
git checkout develop
git pull
git branch -D "$1"
git checkout "$1"
git reset --soft $(git merge-base develop $(git rev-parse --abbrev-ref HEAD))
}
grpr() {
BRANCH=`git rev-parse --abbrev-ref HEAD`
if [ "$BRANCH" = "develop" ]; then
echo "NOT FOR DEVELOP BRANCH"
else
git reset --hard origin
git checkout develop
git branch -D "$BRANCH"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment