how to checkout local git branch commits code example Example: git checkout commit git checkout <commit>