How I undo some changes in my workspace and get back to my last commit?
git
Solution
The answers mentioning `reset --hard` will do what you want (as well as some other things that you may or may not), but you were correct in thinking that `checkout` was the command you needed. The problem is that `checkout` does two different things, so you need to supply it with a path argument:
` git checkout . `
from the root of your repository will do you just fine.
Problem
Possible Duplicate: Git: Revert to previous commit status I've tried some changes in my code but I messed up too many things (never work when you're tired and it's late) and I just want to go back to my last commit. I DIDN'T do `git add` or `git commit` and obviously if I do `git pull` everything is up to date. I thought that `git checkout` was what I needed but it didn't worked.. any help?