'Get a reference pointed to by ``ref``.
The most common will be branches and tags. For a branch, you must
specify \'heads/branchname\' and for a tag, \'tags/tagname\'. Essentially,
the system should return any reference you provide it in the namespace,
including notes and stashes (provided they exist on the server).
:param str ref: (required)
:returns: :class:`Reference <github3.git.Reference>`'

def ref(self, ref):

    json = None
    if ref:
        url = self._build_url(u'git', u'refs', ref, base_url=self._api)
        json = self._json(self._get(url), 200)
    return self._instance_or_null(Reference, json)
