Clone an existing repository to a new bare repository.

def clone(cls, srcpath, destpath, encoding='utf-8'):
        """Clone an existing repository to a new bare repository."""
        cmd = [GIT, 'clone', '--quiet', '--bare', srcpath, destpath]
        subprocess.check_call(cmd)
        return cls(destpath, encoding)