Skip to content

Instantly share code, notes, and snippets.

@zetroot
Created May 28, 2021 10:23
Show Gist options
  • Save zetroot/5e9d4704db6009ea5826e5b15820d279 to your computer and use it in GitHub Desktop.
Save zetroot/5e9d4704db6009ea5826e5b15820d279 to your computer and use it in GitHub Desktop.
Reset master to upstream
# ensures current branch is master
git checkout master
# pulls all new commits made to upstream/master
git pull upstream master
# this will delete all your local changes to master
git reset --hard upstream/master
# take care, this will delete all your changes on your forked master
git push origin master --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment