I have JenkinsFile where I'm trying to get the hash for my current branch. I saw this post: https://stackoverflow.com/questions/9110478/how-to-find-the-hash-of-branch-in-git
but when I tried to run def BranchHash = sh "git rev-parse ${BRANCH-NAME}
I got: fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree
I'm looking for the branch hash, and not the last commit