Skip to content

Instantly share code, notes, and snippets.

@plamber
Created March 27, 2021 05:18
Show Gist options
  • Save plamber/78ff5abf088038283011c93b2990e4e8 to your computer and use it in GitHub Desktop.
Save plamber/78ff5abf088038283011c93b2990e4e8 to your computer and use it in GitHub Desktop.
How do I reset my forked repository
# ensures current branch is master
git checkout main
# pulls all new commits made to upstream/master
git pull upstream main
# this will delete all your local changes to master
git reset --hard upstream/main
# take care, this will delete all your changes on your forked master
git push origin main--force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment