Skip to content

Instantly share code, notes, and snippets.

@cchwala
Created March 28, 2017 09:01
Show Gist options
  • Save cchwala/f2f8c480c910b72bbd4c30c79daf6b97 to your computer and use it in GitHub Desktop.
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
# 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