Support shortRefName in checkoutReference

Users can pass in `.checkoutReference('new_branch')` instead of
`.checkoutReference('refs/heads/new_branch')