Last active
May 18, 2023 07:08
-
-
Save ironpython2001/b77f4553175fb83d200812917db8b360 to your computer and use it in GitHub Desktop.
git undo local changes
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
Refernce: https://stackoverflow.com/questions/1146973/how-do-i-revert-all-local-changes-in-git-managed-project-to-previous-state | |
#!/bin/sh | |
git reset --hard | |
git clean -f -d | |
git checkout HEAD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment