def yaml(self):
        return yaml.dump(self.serialized, default_flow_style=False,
                         encoding=None)
def mkhead(repo: 'Repo', path: PathLike) -> 'Head':
    """:return: New branch/head instance"""
    return git.Head(repo, git.Head.to_full_path(path))