@classmethod
    def init_bare(self, path, mkdir=True, **kwargs):
        """
        Initialize a bare git repository at the given path

        ``path``
            is the full path to the repo (traditionally ends with /<name>.git)

        ``mkdir``
            if specified will create the repository directory if it doesn't
            already exists. Creates the directory with a mode=0755.

        ``kwargs``
            keyword arguments serving as additional options to the git init command

        Examples::

            git.Repo.init_bare('/var/git/myrepo.git')

        Returns
            ``git.Repo`` (the newly created repo)
        """

        if mkdir and not os.path.exists(path):
            os.makedirs(path, 0755)

        git = Git(path)
        output = git.init('--bare', **kwargs)
        return Repo(path)
dataset/ETHPy150Open kergoth/git-origin/git-python/lib/git/repo.py/Repo.init_bare/original