Skip to content

Instantly share code, notes, and snippets.

@renesugar
Forked from glennblock/fork forced sync
Created November 5, 2020 15:34
Show Gist options
  • Save renesugar/a8fb9e4b7f5c9406a72dfa4e5ac09201 to your computer and use it in GitHub Desktop.
Save renesugar/a8fb9e4b7f5c9406a72dfa4e5ac09201 to your computer and use it in GitHub Desktop.
Force your forked repo to be the same as upstream.
git fetch upstream
git reset --hard upstream/master
@renesugar
Copy link
Author

https://gist.github.com/glennblock/1974465

complete git commands would be like this:

git remote add upstream https://github.com/some_user/some_repo
git fetch upstream
git checkout master
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