Skip to content

Instantly share code, notes, and snippets.

View unRARed's full-sized avatar

Ryan Richardson unRARed

View GitHub Profile
@unRARed
unRARed / gist:08a392a7d637b722ef24
Created February 3, 2015 07:28
Bash alias for keeping master branch in sync with upstream repository to better prevent conflicts.
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'