SVN revert equal in Git

Using git, coming from SVN and want to revert changes on a file? In SVN it used to be:

svn revert filename

Well revert in git isn’t what you want to do in this case. Due to it’s local repository you have to think a bit different here. When checking out you get the latest committed version from your local repository, so what you actually have to do is the following:

git checkout filename

Now you have the equivalent to the gold old revert.