Skip to content

Instantly share code, notes, and snippets.

@sleepdefic1t
Last active October 21, 2019 17:36
Show Gist options
  • Save sleepdefic1t/268322d1207879f5cce6eb26ca8039b0 to your computer and use it in GitHub Desktop.
Save sleepdefic1t/268322d1207879f5cce6eb26ca8039b0 to your computer and use it in GitHub Desktop.

Reset a Forked Repo's 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

https://stackoverflow.com/a/42332860/3658031

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment