Created
August 8, 2020 07:59
-
-
Save RohitRathore1/4d43434a2a0198e85f92e355fd40b292 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you have messed in your fork repository after doing some changes then to avoid this problem follow these steps: | |
## Clean up a fork and restart it from a upstream | |
The simplest solution would be (using `upstream` as the remote name referencing the original repo forked): | |
``` | |
git remote add upstream /url/to/original/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
git hacks for my work