grgit-open

Name

grgit-open - Open an existing Git repository

Synopsis

Grgit.open()
Grgit.open(dir: <path>, currentDir: <path>, credentials: <credentials>)
Grgit.open {
  dir = <path>
  currentDir = <path>
  credentials = <credentals>
}

Description

This command opens an existing Git repository. If both dir and currentDir are null, acts as if the currentDir is the JVM’s working directory.

Returns a Grgit instance.

Options

dir

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

currentDir

(Object, default null) The directory to start searching for the repository from. Can be a File, Path, or String.

credentials

(Credentials, default null) An instance of Credentials containing username/password to be used in operations that require authentication. See grgit-authentication for preferred ways to configure this.

Examples