Created
February 3, 2015 07:28
-
-
Save unRARed/08a392a7d637b722ef24 to your computer and use it in GitHub Desktop.
Bash alias for keeping master branch in sync with upstream repository to better prevent conflicts.
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
alias sync_master='WORKING_BRANCH="$(git rev-parse --abbrev-ref HEAD)" && git checkout master && git fetch upstream master && git reset --hard upstream/master && git checkout $WORKING_BRANCH' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment