git checkout or git switch [branch] moves you to the latest commit of the specified branch, allowing you to continue working on it. git checkout [commit-hash] checks out a specific commit, so that you are in a "detached HEAD" state where you're not on any branch. I think the detached Head state is only used to see or inspect you previous commits but anything you change here wont be saved