Skip to content

Instantly share code, notes, and snippets.

@ironpython2001
Last active May 18, 2023 07:08
Show Gist options
  • Save ironpython2001/b77f4553175fb83d200812917db8b360 to your computer and use it in GitHub Desktop.
Save ironpython2001/b77f4553175fb83d200812917db8b360 to your computer and use it in GitHub Desktop.
git undo local changes
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