Skip to content

Instantly share code, notes, and snippets.

@tfenster
Forked from glennblock/fork forced sync
Last active April 15, 2023 05:49
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tfenster/d7da56fe8891b84ff37953d8b738b680 to your computer and use it in GitHub Desktop.
Save tfenster/d7da56fe8891b84ff37953d8b738b680 to your computer and use it in GitHub Desktop.
Force your forked repo to be the same as upstream. Forces master changes into fork and throws away all changes!
if no upstream remote created: git remote add upstream https://[upstream guy's repo url]
git fetch upstream
git reset --hard upstream/master
git push origin master --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment