I just did a git commit, then did git checkout <previous commit>, then did git checkout <most recent commit>. It then said I was in a detached HEAD state. I think I read somewhere that instead of doing git checkout <most recent commit> I should do git checkout <branch name> instead of git checkout <most recent commit>.
What's the difference between these?
 
    