Last active
June 14, 2021 08:46
-
-
Save panoskouf/b2f8e71ce2f01cb1559b2a0ed9913af3 to your computer and use it in GitHub Desktop.
destroy local changes of branch and make it same as remote
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
git fetch origin | |
git reset --hard origin/master | |
# Update @2020 (if you have main branch instead of master in remote repo) | |
git fetch origin | |
git reset --hard origin/main | |
# If you want to save your current branch's state before doing this (just in case), you can do: | |
git commit -a -m "Saving my work, just in case" | |
git branch my-saved-work |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment