How to revert to an old project version of project in xcode?

If i use a local GIT repository, can i use it to revert to an old version of the project?

For example, I have 10 commits, I want to go back to the 5th version. How to do it?