Git the —hard way
Let’s pretend you just successfully commited your latest work to GitHub. All’s fine.
Now let’s pretend that you accidentally ran “rm *” in your project directory. No problem: just run:
git reset —hard
All the changes you made since your last successful commit will be discarded and your deleted files will magically reappear.
Short URL for this post: http://tmblr.co/ZM2Vby4Gs0M