Git revert local commit

I have a git repo hooked up in phpstorm on windows. I committed a few change sets then pushed them to our "central repo". After this I have then made a few more commits. I no longer want these commits that have not been pushed to the central repo. How do I clean my working copy to be the same as the central repo (origin)?


git reset --hard remotes/origin/HEAD

git reset --hard remotes/origin/YOUR/BRANCH

better than /HEAD because you won't see this:

$ git status
On branch MY/BRANCH
Your branch and 'origin/MY/BRANCH' have diverged,
and have 1 and 1 different commit each, respectively.