HEAD ref
suggest changeHEAD is a special ref. It always points to the current object.
You can see where it’s currently pointing by checking the .git/HEAD file.
Normally, HEAD points to another ref:
$cat .git/HEAD
ref: refs/heads/mainlineBut it can also point directly to an object:
$ cat .git/HEAD
4bb6f98a223abc9345a0cef9200562333This is what’s known as a “detached head” - because HEAD is not attached to (pointing at) any ref, but rather points directly to an object.
  Found a mistake? Have a question or improvement idea?
  Let me know.
      
      Table Of Contents