Created
February 23, 2017 16:14
-
-
Save stewsters/5c11e712cf62351a02869882e04e4822 to your computer and use it in GitHub Desktop.
Add this to your path to add a gud command to git. Checks out the latest master and rebases on it.
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
#!/bin/sh | |
branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p') | |
echo "updating $branch to the new master" | |
git fetch | |
git checkout master | |
git pull | |
git checkout $branch | |
git rebase -i master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment