Created
May 16, 2019 13:55
-
-
Save m4rr/1d1992eea88292dd01a0c8ee2628f05b to your computer and use it in GitHub Desktop.
m4rr zshrc to view pull requests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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