Skip to content

Instantly share code, notes, and snippets.

@alanshaw
Last active October 3, 2017 12:47
Show Gist options
  • Save alanshaw/c3768259969d19dcc6b8e640d8bb611a to your computer and use it in GitHub Desktop.
Save alanshaw/c3768259969d19dcc6b8e640d8bb611a to your computer and use it in GitHub Desktop.
How to revert Master branch to upstream
# https://stackoverflow.com/questions/8134960/how-to-revert-master-branch-to-upstream
git remote update
# the double hyphen ensures that upstream/master is
# considered as a revision and not confused as a path
git reset --hard upstream/master --
git push origin +master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment