If you already commited changes, then:
git reset (--hard) HEAD~1
If not then:
git resetgit ls-files -d -z | xargs -0 git checkout --