Last active
June 14, 2021 18:47
-
-
Save Lecarvalho/ab7b0905ae0137672c1909cfa571fdad 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
# Discard all local commits | |
git reset --hard origin/[branch] | |
# Discard last commit on remote and discard local changes | |
git reset --hard HEAD~1 | |
# Discard last commit on remote and keep change files in local | |
git reset --soft HEAD~1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment