Revert All Local Changes in Git
You're coding. Everything is going well until disaster strikes. You try to fix the problem but every fix seems to take you down a path of interminable doom. You have to abandon ship.
Fear not. There is an easy way for you to revert all the changes that you've made to your local copy of the Git Repository. It goes like this:
git checkout ./
Boom. That's it. You can tell yourself every genius gets misguided sometimes; it's okay. Keep making magic.
Not everyone gets a second chance, you know?
Written by Ricardo Vazquez
Related protips
1 Response
@michd I knew about --hard but didn't know that it undoes staged changes. Thanks for the tip man!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Changes
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#