Currently createRef expects a fully qualified ref name ('refs/heads/master') while getRef prepends the 'refs/' and will fail if called with the same argument as createRef.
This is confusing, I suggest to align the APIs or at least prevent getRef from auto-adding 'refs/' to the path if the provided name already starts with 'refs/'.