bare: If TRUE, a Git repository without a working directory is created at the pointed path. If FALSE, provided path will be considered as the working directory into which the .git directory will be created.
branch: Use the specified name for the initial branch in the newly created repository. If branch=NULL, fall back to the default name.
Returns
A git_repository object
Examples
## Not run:## Initialize a repositorypath <- tempfile(pattern="git2r-")dir.create(path)repo <- init(path)is_bare(repo)## Initialize a bare repositorypath_bare <- tempfile(pattern="git2r-")dir.create(path_bare)repo_bare <- init(path_bare, bare =TRUE)is_bare(repo_bare)## End(Not run)