Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Enumerations

Type aliases

Functions

Type aliases

StatusInfo

StatusInfo<T>: { ahead: T extends AHEAD ? true : false; behind: T extends BEHIND ? true : false; branch: T extends OUT_OF_SYNC ? string | null | undefined : string; comparison: T extends OUT_OF_SYNC ? string | null | undefined : string; out-of-sync: T extends OUT_OF_SYNC ? true : false; status: T; up-to-date: T extends UP_TO_DATE ? true : false }

Resolved value of the promise returned by git.status

property

{string} branch - The current branch

property

{string} comparison - Full text of the comparison from git status's output

property

{string} status - The current status

property

{boolean} "BEHIND" - True if the current status === "BEHIND"

property

{boolean} "AHEAD" - True if the current status === "AHEAD"

property

{boolean} "UP_TO_DATE" - True if the current status === "UP_TO_DATE"

property

{boolean} "OUT_OF_SYNC" - True if the current status === "OUT_OF_SYNC"

Type parameters

Type declaration

  • ahead: T extends AHEAD ? true : false
  • behind: T extends BEHIND ? true : false
  • branch: T extends OUT_OF_SYNC ? string | null | undefined : string
  • comparison: T extends OUT_OF_SYNC ? string | null | undefined : string
  • out-of-sync: T extends OUT_OF_SYNC ? true : false
  • status: T
  • up-to-date: T extends UP_TO_DATE ? true : false

Functions

Const clone

  • clone(remote: string, dest: string, ...args: string[]): Promise<string> & ChildProcess
  • executes git clone

    Parameters

    • remote: string

      the remote repository to clone

    • dest: string

      local path to clone the repository into

    • Rest ...args: string[]

      additional arguments to pass to git clone

    Returns Promise<string> & ChildProcess

    an object combining the child process that was spawned, and a promise that resolves to the string output to stdout.

Const fetch

  • fetch(dir: string, ...args: string[]): Promise<string> & ChildProcess
  • executes git fetch

    Parameters

    • dir: string

      the local path to the git repository

    • Rest ...args: string[]

      additional arguments to pass to git fetch

    Returns Promise<string> & ChildProcess

    an object combining the child process that was spawned, and a promise that resolves to the string output to stdout.

Const pull

  • pull(dir: string, ...args: string[]): Promise<string> & ChildProcess
  • executes git pull

    Parameters

    • dir: string

      the local path to the git repository

    • Rest ...args: string[]

      additional arguments to pass to git pull

    Returns Promise<string> & ChildProcess

    an object combining the child process that was spawned, and a promise that resolves to the string output to stdout.

Const status

  • status(dir: string, ...args: string[]): Promise<StatusInfo<Status>> & ChildProcess
  • executes git status

    Parameters

    • dir: string

      the local path to the git repository

    • Rest ...args: string[]

      additional arguments to pass to git status

    Returns Promise<StatusInfo<Status>> & ChildProcess

    an object combining the child process that was spawned, and a promise that resolves to information about the repository's status.

Generated using TypeDoc