Last active
October 10, 2015 22:18
-
-
Save KidkArolis/56edcc5e91004833d2df to your computer and use it in GitHub Desktop.
Update local repo after merging a PR
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
# add this to your ~/.bash_profile or similar | |
# say you're on a branch `my-feature` and | |
# you merge the PR for that branch on GitHub | |
# you can now execute `gu` to run the following | |
gu () { | |
branch=$(git symbolic-ref --short HEAD) | |
git checkout master | |
git pull | |
git remote prune origin | |
git branch -d $branch | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment