Created
October 4, 2012 22:16
-
-
Save patbenatar/3836827 to your computer and use it in GitHub Desktop.
Bash script for git pull rebase shorthand
This file contains 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
# Git pull and rebase | |
# Show git log if rebasing finds new changes | |
# You can optionally pass in a remote and branch | |
function gpr { | |
output=`git pull --rebase $1 $2` | |
echo $output | |
if [[ $output != *is\ up\ to\ date\.* ]] then | |
git log -n 3 | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment