datalad_core.create.create_repo
- datalad_core.create.create_repo(directory: Path, *, bare: bool = False, branch: str | None = None, quiet: bool = False) Repo | Worktree[source]
Create a repository in a new or empty directory
This is a thin frontend for the
git-initcommand for creating a new repository indirectory. All parameters correspond exactly to thegit-cloneCLI arguments. If the target directory does not yet exist, it will be created.Depending on the
bareparameter, aRepoorWorktreeinstance is returned.