It only removes the last commit. It's terribly named IMO, actually, cause I think that's seldomly the kind of thing you get into "omg I messed up how do I undo" panic for.
The undo described here is much more powerful and much closer to what people expect from the word "undo" from its functionality in other tools.
[1]: https://github.com/tj/git-extras