grgit-init

Name

grgit-init - Create an empty Git repository

Synopsis

Grgit.init(dir: <path>, bare: <boolean>)
Grgit.init {
  dir = <path>
  bare = <boolean>
}

Description

This command creates an empty Git repository - basically a .git directory with subdirectories for objects, refs/heads, refs/tags, and template files. An initial HEAD file that references the HEAD of the master branch is also created.

Returns a Grgit instance.

Options

dir

(Object, default null) The directory the repository should be initialized in. Can be a File, Path, or String.

bare

(boolean, default false) Create a bare repository.

Examples