Skip to content

Instantly share code, notes, and snippets.

@cxhercules
Forked from glennblock/fork forced sync
Created July 25, 2018 15:15
Show Gist options
  • Save cxhercules/3990e8c1e11349f789508eac8c9e421b to your computer and use it in GitHub Desktop.
Save cxhercules/3990e8c1e11349f789508eac8c9e421b 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
@cxhercules
Copy link
Author

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