In order to return your local working copy to the state it was in when commit 5b31ec198 was checked in, just go to the top directory of your working copy and use git checkout 5b31ec198
.
If you have changes that haven't been checked in, you'll need to check them in first, or use git stash save
to save them for later.