Created
March 28, 2017 09:01
-
-
Save cchwala/f2f8c480c910b72bbd4c30c79daf6b97 to your computer and use it in GitHub Desktop.
Force update of local and remote fork if they diverged too far from upstream master
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
# Get the upstream, i.e. main repo, master | |
git fetch upstream | |
# Force the current local branch to equal upstream master | |
git reset --hard upstream/master | |
# Force update of remote repo. WARNING: THIS CAN BREAK STUFF | |
git push origin master --force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment