Gets the current git reference (branch, tag, or commit SHA).
Attempts to determine the current ref in this order:
Current git reference as a string
When git commands fail
Gets the current git reference (branch, tag, or commit SHA).
Attempts to determine the current ref in this order: