Created
October 3, 2010 04:13
-
-
Save HashNuke/608259 to your computer and use it in GitHub Desktop.
to undo push and commits
This file contains hidden or 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
# to undo a git push | |
git push -f origin HEAD^:master | |
# to get to previous commit (preserves working tree) | |
git reset --soft HEAD | |
# to get back to previous commit (you'll lose working tree) | |
git reset --hard HEAD^ |
it saved my life too
just saved a life here in 2023
Here 2023, just saved me too 😊
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
saved me on my first internship in 2022. Still working!!!