Check out the required commit when ref is not HEAD
Merge pull request #170 from kho/master

Check out the required commit when ref is not HEAD