Checkout git checkout <commit-hash> # move HEAD to specific commit (detached HEAD) git checkout <file-path> # restore file to last committed state git checkout <branch> # switch to another branch