I\'m from a Subversion background and, when I had a branch, I knew what I was working on with \"These working files point to this branch\".
But with Git I\'m not sur
Returns either branch name or SHA1 when on detached head:
git rev-parse --abbrev-ref HEAD | grep -v ^HEAD$ || git rev-parse HEAD
This is a short version of @dmaestro12's answer and without tag support.