git checkout <commit-hash> vs git checkout branch
问题 I was playing around with git and got confused here. The HEAD of develop branch is at 235a6d8 When I do: git checkout 235a6d8 from any other branch or from develop branch , this leaves me in detached head. I am not sure why does this happen when I am checking out to the latest commit on this branch. When I do: git checkout develop I can switch to develop branch correctly. I am not getting the difference between git checkout <commit-has> and git checkout branchname . How they are different ?