The documentation for the "ref" parameter is
The Git ref to checkout. This is a ref, so it can point to a commit SHA, a branch name, etc. If it is a named ref such as a branch name, go-getter will update it to the latest on each get.
However the implementation is to call the "--branch" option on the git command line, meaning that it has to be either a branch or tag name. The implementation of --branch in git is to list through the refs, finding either "refs/heads/" (for priority) or "refs/tags/".
Experimentation also shows that you can't pass a SHA, or string such as "refs/heads/master" etc, you can only pass a branch name or tag name. There are tests in go-getter that test the ref parameter being a branch name or a tag name, but nothing further also.
So I think the documentation needs clarifying here.