You should learn the basics of the git object model. It's really very simple and can help you understand better what some of the commands are actually doing. Lots of git stuff is just stored as plain text file inside the .git folder - the magic 'HEAD' ref is just a textfile that contains the hash of the HEAD commit.
http://shafiul.github.io/gitbook/1_the_git_object_model.html