Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GitClient

A git client.

Hierarchy

  • GitClient

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • Initializes a new instance of that class.

    Parameters

    • executable: GitExecutable

      The data of the executable.

    • Optional cwd: string

    Returns GitClient

Properties

cwd

cwd: string

Gets the current working directory.

executable

executable: GitExecutable

The data of the executable.

Methods

branches

  • branches(): Promise<Branch[]>

changes

exec

  • exec(args: any[], opts?: ExecFileOptions): Promise<string>
  • Executes the Git client and returns the stdout.

    Parameters

    • args: any[]

      Arguments for the execution.

    • Optional opts: ExecFileOptions

    Returns Promise<string>

    The promise with the standard output.

execFile

  • execFile(args: any[], opts?: ExecFileOptions): Promise<ExecResult>
  • Executes the Git client.

    Parameters

    • args: any[]

      Arguments for the execution.

    • Optional opts: ExecFileOptions

    Returns Promise<ExecResult>

    The promise with the result.

version

  • version(): Promise<string>
  • Detects the version of the underlying Git client.

    Returns Promise<string>

    The promise with the version.

Generated using TypeDoc