simple-git

  • Version 2.46.0
  • Published
  • 404 kB
  • 3 dependencies
  • MIT license

Install

npm i simple-git
yarn add simple-git
pnpm add simple-git

Overview

Simple GIT interface for node.js

Index

Variables

Classes

Interfaces

Enums

Type Aliases

Variables

variable gitP

const gitP: SimpleGitFactory;

    variable simpleGit

    const simpleGit: SimpleGitFactory;

      Classes

      class GitConstructError

      class GitConstructError extends GitError {}
      • The GitConstructError is thrown when an error occurs in the constructor of the simple-git instance itself. Most commonly as a result of using a baseDir option that points to a folder that either does not exist, or cannot be read by the user the node script is running as.

        Check the .message property for more detail including the properties passed to the constructor.

      constructor

      constructor(config: SimpleGitOptions, message: string);

        property config

        readonly config: SimpleGitOptions;

          class GitError

          class GitError extends Error {}
          • The GitError is thrown when the underlying git process throws a fatal exception (eg an ENOENT exception when attempting to use a non-writable directory as the root for your repo), and acts as the base class for more specific errors thrown by the parsing of the git response or errors in the configuration of the task about to be run.

            When an exception is thrown, pending tasks in the same instance will not be executed. The recommended way to run a series of tasks that can independently fail without needing to prevent future tasks from running is to catch them individually:

            import { gitP, SimpleGit, GitError, PullResult } from 'simple-git';
            function catchTask (e: GitError) {
            return e.
            }
            const git = gitP(repoWorkingDir);
            const pulled: PullResult | GitError = await git.pull().catch(catchTask);
            const pushed: string | GitError = await git.pushTags().catch(catchTask);

          constructor

          constructor(
          task?: EmptyTask | StringTask<any> | BufferTask<any>,
          message?: string
          );

            property task

            task?: EmptyTask | StringTask<any> | BufferTask<any>;

              class GitPluginError

              class GitPluginError extends GitError {}

                constructor

                constructor(
                task?: EmptyTask | StringTask<any> | BufferTask<any>,
                plugin?:
                | 'progress'
                | 'timeout'
                | 'completion'
                | 'errors'
                | 'spawnOptions'
                | 'baseDir'
                | 'binary'
                | 'maxConcurrentProcesses'
                | 'config',
                message?: string
                );

                  property plugin

                  readonly plugin?:
                  | 'progress'
                  | 'timeout'
                  | 'completion'
                  | 'errors'
                  | 'spawnOptions'
                  | 'baseDir'
                  | 'binary'
                  | 'maxConcurrentProcesses'
                  | 'config';

                    property task

                    task?: EmptyTask | StringTask<any> | BufferTask<any>;

                      class GitResponseError

                      class GitResponseError<T = any> extends GitError {}
                      • The GitResponseError is the wrapper for a parsed response that is treated as a fatal error, for example attempting a merge can leave the repo in a corrupted state when there are conflicts so the task will reject rather than resolve.

                        For example, catching the merge conflict exception:

                        import { gitP, SimpleGit, GitResponseError, MergeSummary } from 'simple-git';
                        const git = gitP(repoRoot);
                        const mergeOptions: string[] = ['--no-ff', 'other-branch'];
                        const mergeSummary: MergeSummary = await git.merge(mergeOptions)
                        .catch((e: GitResponseError<MergeSummary>) => e.git);
                        if (mergeSummary.failed) {
                        // deal with the error
                        }

                      constructor

                      constructor(git: {}, message?: string);

                        property git

                        readonly git: {};
                        • .git access the parsed response that is treated as being an error

                        class TaskConfigurationError

                        class TaskConfigurationError extends GitError {}
                        • The TaskConfigurationError is thrown when a command was incorrectly configured. An error of this kind means that no attempt was made to run your command through the underlying git binary.

                          Check the .message property for more detail on why your configuration resulted in an error.

                        constructor

                        constructor(message?: string);

                          Interfaces

                          interface BranchMultiDeleteResult

                          interface BranchMultiDeleteResult {}
                          • Represents the status of having deleted a batch of branches

                          property all

                          all: BranchSingleDeleteResult[];
                          • All branches included in the response

                          property branches

                          branches: { [branchName: string]: BranchSingleDeleteResult };
                          • Branches mapped by their branch name

                          property errors

                          errors: BranchSingleDeleteResult[];
                          • Array of responses that are in error

                          property success

                          readonly success: boolean;
                          • Flag showing whether all branches were deleted successfully

                          interface BranchSingleDeleteFailure

                          interface BranchSingleDeleteFailure {}
                          • Represents the failure to delete a single branch

                          property branch

                          branch: string;

                            property hash

                            hash: null;

                              property success

                              success: false;

                                interface BranchSingleDeleteSuccess

                                interface BranchSingleDeleteSuccess {}
                                • Represents the successful deletion of a single branch

                                property branch

                                branch: string;

                                  property hash

                                  hash: string;

                                    property success

                                    success: true;

                                      interface BranchSummary

                                      interface BranchSummary {}

                                        property all

                                        all: string[];

                                          property branches

                                          branches: {
                                          [key: string]: BranchSummaryBranch;
                                          };

                                            property current

                                            current: string;

                                              property detached

                                              detached: boolean;

                                                interface BranchSummaryBranch

                                                interface BranchSummaryBranch {}

                                                  property commit

                                                  commit: string;

                                                    property current

                                                    current: boolean;

                                                      property label

                                                      label: string;

                                                        property name

                                                        name: string;

                                                          interface CleanSummary

                                                          interface CleanSummary {}

                                                            property dryRun

                                                            readonly dryRun: boolean;

                                                              property files

                                                              files: string[];

                                                                property folders

                                                                folders: string[];

                                                                  property paths

                                                                  paths: string[];

                                                                    interface CommitResult

                                                                    interface CommitResult {}

                                                                      property author

                                                                      author: null | {
                                                                      email: string;
                                                                      name: string;
                                                                      };

                                                                        property branch

                                                                        branch: string;

                                                                          property commit

                                                                          commit: string;

                                                                            property root

                                                                            root: boolean;

                                                                              property summary

                                                                              summary: {
                                                                              changes: number;
                                                                              insertions: number;
                                                                              deletions: number;
                                                                              };

                                                                                interface ConfigGetResult

                                                                                interface ConfigGetResult {}
                                                                                • Represents the response to using git.getConfig

                                                                                property key

                                                                                key: string;
                                                                                • The key that was searched for

                                                                                property paths

                                                                                paths: string[];
                                                                                • The file paths from which configuration was read

                                                                                property scopes

                                                                                scopes: Map<string, string[]>;
                                                                                • The full hierarchy of values the property can have had across the various scopes that were searched (keys in this Map are the strings also found in the paths array).

                                                                                property value

                                                                                value: string | null;
                                                                                • The single value seen by git for this key (equivalent to git config --get key)

                                                                                property values

                                                                                values: string[];
                                                                                • All possible values for this key no matter the scope (equivalent to git config --get-all key)

                                                                                interface ConfigListSummary

                                                                                interface ConfigListSummary {}
                                                                                • Represents the current git configuration, as defined by the output from git log

                                                                                property all

                                                                                readonly all: ConfigValues;
                                                                                • All configuration settings, where local/user settings override user/global settings the overridden value will appear in this object.

                                                                                property files

                                                                                files: string[];
                                                                                • The file paths configuration was read from

                                                                                property values

                                                                                values: { [fileName: string]: ConfigValues };
                                                                                • The ConfigValues for each of the files, use this object to determine local repo, user and global settings.

                                                                                interface ConfigValues

                                                                                interface ConfigValues {}
                                                                                • Represents the map of configuration settings

                                                                                index signature

                                                                                [key: string]: string | string[];

                                                                                  interface DefaultLogFields

                                                                                  interface DefaultLogFields {}

                                                                                    property author_email

                                                                                    author_email: string;

                                                                                      property author_name

                                                                                      author_name: string;

                                                                                        property body

                                                                                        body: string;

                                                                                          property date

                                                                                          date: string;

                                                                                            property hash

                                                                                            hash: string;

                                                                                              property message

                                                                                              message: string;

                                                                                                property refs

                                                                                                refs: string;

                                                                                                  interface DiffResult

                                                                                                  interface DiffResult {}

                                                                                                    property changed

                                                                                                    changed: number;
                                                                                                    • The total number of files changed as reported in the summary line

                                                                                                    property deletions

                                                                                                    deletions: number;
                                                                                                    • The number of files changed with deletions

                                                                                                    property files

                                                                                                    files: Array<DiffResultTextFile | DiffResultBinaryFile>;
                                                                                                    • When present in the diff, lists the details of each file changed

                                                                                                    property insertions

                                                                                                    insertions: number;
                                                                                                    • The number of files changed with insertions

                                                                                                    interface DiffResultBinaryFile

                                                                                                    interface DiffResultBinaryFile {}

                                                                                                      property after

                                                                                                      after: number;

                                                                                                        property before

                                                                                                        before: number;

                                                                                                          property binary

                                                                                                          binary: true;

                                                                                                            property file

                                                                                                            file: string;

                                                                                                              interface DiffResultTextFile

                                                                                                              interface DiffResultTextFile {}

                                                                                                                property binary

                                                                                                                binary: false;

                                                                                                                  property changes

                                                                                                                  changes: number;

                                                                                                                    property deletions

                                                                                                                    deletions: number;

                                                                                                                      property file

                                                                                                                      file: string;

                                                                                                                        property insertions

                                                                                                                        insertions: number;

                                                                                                                          interface FetchResult

                                                                                                                          interface FetchResult {}

                                                                                                                            property branches

                                                                                                                            branches: {
                                                                                                                            name: string;
                                                                                                                            tracking: string;
                                                                                                                            }[];

                                                                                                                              property raw

                                                                                                                              raw: string;

                                                                                                                                property remote

                                                                                                                                remote: string | null;

                                                                                                                                  property tags

                                                                                                                                  tags: {
                                                                                                                                  name: string;
                                                                                                                                  tracking: string;
                                                                                                                                  }[];

                                                                                                                                    interface FileStatusResult

                                                                                                                                    interface FileStatusResult {}

                                                                                                                                      property from

                                                                                                                                      from?: string;
                                                                                                                                      • Original location of the file, when the file has been moved

                                                                                                                                      property index

                                                                                                                                      index: string;
                                                                                                                                      • First digit of the status code of the file, e.g. 'M' = modified. Represents the status of the index if no merge conflicts, otherwise represents status of one side of the merge.

                                                                                                                                      property path

                                                                                                                                      path: string;
                                                                                                                                      • Path of the file

                                                                                                                                      property working_dir

                                                                                                                                      working_dir: string;
                                                                                                                                      • Second digit of the status code of the file. Represents status of the working directory if no merge conflicts, otherwise represents status of other side of a merge.

                                                                                                                                      interface InitResult

                                                                                                                                      interface InitResult {}
                                                                                                                                      • The InitResult is returned when (re)initialising a git repo.

                                                                                                                                      property bare

                                                                                                                                      readonly bare: boolean;
                                                                                                                                      • Boolean representing whether the --bare option was used

                                                                                                                                      property existing

                                                                                                                                      readonly existing: boolean;
                                                                                                                                      • Boolean representing whether the repo already existed (re-initialised rather than initialised)

                                                                                                                                      property gitDir

                                                                                                                                      readonly gitDir: string;
                                                                                                                                      • The git configuration directory - for a bare repo this is the same as path, in non-bare repos this will usually be a sub-directory with the name .git (or value of the $GIT_DIR environment variable).

                                                                                                                                      property path

                                                                                                                                      readonly path: string;
                                                                                                                                      • The path used when initialising

                                                                                                                                      interface ListLogLine

                                                                                                                                      interface ListLogLine {}
                                                                                                                                      • The ListLogLine represents a single entry in the git.log, the properties on the object are mixed in depending on the names used in the format (see DefaultLogFields), but some properties are dependent on the command used.

                                                                                                                                      property diff

                                                                                                                                      diff?: DiffResult;
                                                                                                                                      • When using a --stat=4096 or --shortstat options in the git.log or git.stashList, each entry in the ListLogSummary will also have a diff property representing as much detail as was given in the response.

                                                                                                                                      interface LogResult

                                                                                                                                      interface LogResult<T = DefaultLogFields> {}

                                                                                                                                        property all

                                                                                                                                        all: ReadonlyArray<T & ListLogLine>;

                                                                                                                                          property latest

                                                                                                                                          latest: (T & ListLogLine) | null;

                                                                                                                                            property total

                                                                                                                                            total: number;

                                                                                                                                              interface MergeConflict

                                                                                                                                              interface MergeConflict {}
                                                                                                                                              • Represents a single file with conflicts in the MergeSummary

                                                                                                                                              property file

                                                                                                                                              file: string | null;
                                                                                                                                              • Path to file

                                                                                                                                              property meta

                                                                                                                                              meta?: MergeConflictDeletion;
                                                                                                                                              • Additional detail for the specific type of conflict

                                                                                                                                              property reason

                                                                                                                                              reason: string;
                                                                                                                                              • Type of conflict

                                                                                                                                              interface MergeConflictDeletion

                                                                                                                                              interface MergeConflictDeletion {}
                                                                                                                                              • Where the file was deleted, if there is a modify/delete conflict

                                                                                                                                              property deleteRef

                                                                                                                                              deleteRef: string;

                                                                                                                                                interface MergeDetail

                                                                                                                                                interface MergeDetail {}

                                                                                                                                                  property conflicts

                                                                                                                                                  conflicts: MergeConflict[];

                                                                                                                                                    property failed

                                                                                                                                                    readonly failed: boolean;

                                                                                                                                                      property merges

                                                                                                                                                      merges: string[];

                                                                                                                                                        property result

                                                                                                                                                        result: MergeResultStatus;

                                                                                                                                                          interface MoveResult

                                                                                                                                                          interface MoveResult {}
                                                                                                                                                          • A parsed response summary for calls to git mv

                                                                                                                                                          property moves

                                                                                                                                                          moves: Array<{ from: string; to: string }>;
                                                                                                                                                          • Array of files moved

                                                                                                                                                          interface PullDetail

                                                                                                                                                          interface PullDetail {}

                                                                                                                                                            property created

                                                                                                                                                            created: string[];
                                                                                                                                                            • Array of file names that have been created

                                                                                                                                                            property deleted

                                                                                                                                                            deleted: string[];
                                                                                                                                                            • Array of file names that have been deleted

                                                                                                                                                            property deletions

                                                                                                                                                            deletions: PullDetailFileChanges;
                                                                                                                                                            • Map of file names to the number of deletions in that file

                                                                                                                                                            property files

                                                                                                                                                            files: string[];
                                                                                                                                                            • Array of all files that are referenced in the pull

                                                                                                                                                            property insertions

                                                                                                                                                            insertions: PullDetailFileChanges;
                                                                                                                                                            • Map of file names to the number of insertions in that file

                                                                                                                                                            property summary

                                                                                                                                                            summary: PullDetailSummary;

                                                                                                                                                              interface PullDetailFileChanges

                                                                                                                                                              interface PullDetailFileChanges {}

                                                                                                                                                                index signature

                                                                                                                                                                [fileName: string]: number;

                                                                                                                                                                  interface PullDetailSummary

                                                                                                                                                                  interface PullDetailSummary {}

                                                                                                                                                                    property changes

                                                                                                                                                                    changes: number;

                                                                                                                                                                      property deletions

                                                                                                                                                                      deletions: number;

                                                                                                                                                                        property insertions

                                                                                                                                                                        insertions: number;

                                                                                                                                                                          interface PullResult

                                                                                                                                                                          interface PullResult extends PullDetail, RemoteMessageResult {}

                                                                                                                                                                            interface PushDetail

                                                                                                                                                                            interface PushDetail {}

                                                                                                                                                                              property branch

                                                                                                                                                                              branch?: {
                                                                                                                                                                              local: string;
                                                                                                                                                                              remote: string;
                                                                                                                                                                              remoteName: string;
                                                                                                                                                                              };

                                                                                                                                                                                property pushed

                                                                                                                                                                                pushed: PushResultPushedItem[];

                                                                                                                                                                                  property ref

                                                                                                                                                                                  ref?: {
                                                                                                                                                                                  local: string;
                                                                                                                                                                                  };

                                                                                                                                                                                    property repo

                                                                                                                                                                                    repo?: string;

                                                                                                                                                                                      property update

                                                                                                                                                                                      update?: PushResultBranchUpdate;

                                                                                                                                                                                        interface PushResult

                                                                                                                                                                                        interface PushResult
                                                                                                                                                                                        extends PushDetail,
                                                                                                                                                                                        RemoteMessageResult<PushResultRemoteMessages> {}

                                                                                                                                                                                          interface PushResultBranchUpdate

                                                                                                                                                                                          interface PushResultBranchUpdate {}

                                                                                                                                                                                            property hash

                                                                                                                                                                                            hash: {
                                                                                                                                                                                            from: string;
                                                                                                                                                                                            to: string;
                                                                                                                                                                                            };

                                                                                                                                                                                              property head

                                                                                                                                                                                              head: {
                                                                                                                                                                                              local: string;
                                                                                                                                                                                              remote: string;
                                                                                                                                                                                              };

                                                                                                                                                                                                interface PushResultPushedItem

                                                                                                                                                                                                interface PushResultPushedItem {}

                                                                                                                                                                                                property alreadyUpdated

                                                                                                                                                                                                readonly alreadyUpdated: boolean;

                                                                                                                                                                                                  property branch

                                                                                                                                                                                                  readonly branch: boolean;

                                                                                                                                                                                                    property deleted

                                                                                                                                                                                                    readonly deleted: boolean;

                                                                                                                                                                                                      property local

                                                                                                                                                                                                      local: string;

                                                                                                                                                                                                        property new

                                                                                                                                                                                                        readonly new: boolean;

                                                                                                                                                                                                          property remote

                                                                                                                                                                                                          remote: string;

                                                                                                                                                                                                            property tag

                                                                                                                                                                                                            readonly tag: boolean;

                                                                                                                                                                                                              interface PushResultRemoteMessages

                                                                                                                                                                                                              interface PushResultRemoteMessages extends RemoteMessages {}

                                                                                                                                                                                                                property pullRequestUrl

                                                                                                                                                                                                                pullRequestUrl?: string;

                                                                                                                                                                                                                  property vulnerabilities

                                                                                                                                                                                                                  vulnerabilities?: {
                                                                                                                                                                                                                  count: number;
                                                                                                                                                                                                                  summary: string;
                                                                                                                                                                                                                  url: string;
                                                                                                                                                                                                                  };

                                                                                                                                                                                                                    interface RemoteMessageResult

                                                                                                                                                                                                                    interface RemoteMessageResult<T extends RemoteMessages = RemoteMessages> {}

                                                                                                                                                                                                                      property remoteMessages

                                                                                                                                                                                                                      remoteMessages: T;

                                                                                                                                                                                                                        interface RemoteMessages

                                                                                                                                                                                                                        interface RemoteMessages {}

                                                                                                                                                                                                                          property all

                                                                                                                                                                                                                          all: string[];

                                                                                                                                                                                                                            property objects

                                                                                                                                                                                                                            objects?: RemoteMessagesObjectEnumeration;

                                                                                                                                                                                                                              interface RemoteMessagesObjectEnumeration

                                                                                                                                                                                                                              interface RemoteMessagesObjectEnumeration {}

                                                                                                                                                                                                                                property compressing

                                                                                                                                                                                                                                compressing: number;

                                                                                                                                                                                                                                  property counting

                                                                                                                                                                                                                                  counting: number;

                                                                                                                                                                                                                                    property enumerating

                                                                                                                                                                                                                                    enumerating: number;

                                                                                                                                                                                                                                      property packReused

                                                                                                                                                                                                                                      packReused: number;

                                                                                                                                                                                                                                        property reused

                                                                                                                                                                                                                                        reused: {
                                                                                                                                                                                                                                        count: number;
                                                                                                                                                                                                                                        delta: number;
                                                                                                                                                                                                                                        };

                                                                                                                                                                                                                                          property total

                                                                                                                                                                                                                                          total: {
                                                                                                                                                                                                                                          count: number;
                                                                                                                                                                                                                                          delta: number;
                                                                                                                                                                                                                                          };

                                                                                                                                                                                                                                            interface RemoteWithoutRefs

                                                                                                                                                                                                                                            interface RemoteWithoutRefs {}

                                                                                                                                                                                                                                              property name

                                                                                                                                                                                                                                              name: string;

                                                                                                                                                                                                                                                interface RemoteWithRefs

                                                                                                                                                                                                                                                interface RemoteWithRefs extends RemoteWithoutRefs {}

                                                                                                                                                                                                                                                  property refs

                                                                                                                                                                                                                                                  refs: {
                                                                                                                                                                                                                                                  fetch: string;
                                                                                                                                                                                                                                                  push: string;
                                                                                                                                                                                                                                                  };

                                                                                                                                                                                                                                                    interface SimpleGit

                                                                                                                                                                                                                                                    interface SimpleGit extends SimpleGitBase {}

                                                                                                                                                                                                                                                      method addAnnotatedTag

                                                                                                                                                                                                                                                      addAnnotatedTag: (
                                                                                                                                                                                                                                                      tagName: string,
                                                                                                                                                                                                                                                      tagMessage: string,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<{ name: string }>
                                                                                                                                                                                                                                                      ) => Response<{ name: string }>;
                                                                                                                                                                                                                                                      • Add an annotated tag to the head of the current branch

                                                                                                                                                                                                                                                      method addConfig

                                                                                                                                                                                                                                                      addConfig: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      key: string,
                                                                                                                                                                                                                                                      value: string,
                                                                                                                                                                                                                                                      append?: boolean,
                                                                                                                                                                                                                                                      scope?: keyof typeof types.GitConfigScope,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      key: string,
                                                                                                                                                                                                                                                      value: string,
                                                                                                                                                                                                                                                      append?: boolean,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      key: string,
                                                                                                                                                                                                                                                      value: string,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Add config to local git instance for the specified key (eg: user.name) and value (eg: 'your name'). Set append to true to append to rather than overwrite the key

                                                                                                                                                                                                                                                      method addRemote

                                                                                                                                                                                                                                                      addRemote: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      remoteName: string,
                                                                                                                                                                                                                                                      remoteRepo: string,
                                                                                                                                                                                                                                                      options?: types.TaskOptions,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      remoteName: string,
                                                                                                                                                                                                                                                      remoteRepo: string,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Adds a remote to the list of remotes.

                                                                                                                                                                                                                                                        - remoteName Name of the repository - eg "upstream" - remoteRepo Fully qualified SSH or HTTP(S) path to the remote repo - options Optional additional settings permitted by the git remote add command, merged into the command prior to the repo name and remote url

                                                                                                                                                                                                                                                      method addTag

                                                                                                                                                                                                                                                      addTag: (
                                                                                                                                                                                                                                                      name: string,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<{ name: string }>
                                                                                                                                                                                                                                                      ) => Response<{ name: string }>;
                                                                                                                                                                                                                                                      • Add a lightweight tag to the head of the current branch

                                                                                                                                                                                                                                                      method applyPatch

                                                                                                                                                                                                                                                      applyPatch: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      patches: string | string[],
                                                                                                                                                                                                                                                      options: types.TaskOptions<types.ApplyOptions>,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      patches: string | string[],
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Applies a patch to the repo

                                                                                                                                                                                                                                                      method binaryCatFile

                                                                                                                                                                                                                                                      binaryCatFile: (
                                                                                                                                                                                                                                                      options: string[],
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<any>
                                                                                                                                                                                                                                                      ) => Response<any>;
                                                                                                                                                                                                                                                      • Equivalent to catFile but will return the native Buffer of content from the git command's stdout.

                                                                                                                                                                                                                                                      method branch

                                                                                                                                                                                                                                                      branch: (
                                                                                                                                                                                                                                                      options?: types.TaskOptions,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.BranchSummary>
                                                                                                                                                                                                                                                      ) => Response<resp.BranchSummary>;
                                                                                                                                                                                                                                                      • List all branches

                                                                                                                                                                                                                                                      method branchLocal

                                                                                                                                                                                                                                                      branchLocal: (
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.BranchSummary>
                                                                                                                                                                                                                                                      ) => Response<resp.BranchSummary>;
                                                                                                                                                                                                                                                      • List of local branches

                                                                                                                                                                                                                                                      method catFile

                                                                                                                                                                                                                                                      catFile: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      options: string[],
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (callback?: types.SimpleGitTaskCallback<string, GitError>): Response<string>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Returns a list of objects in a tree based on commit hash. Passing in an object hash returns the object's content, size, and type.

                                                                                                                                                                                                                                                        Passing "-p" will instruct cat-file to determine the object type, and display its formatted contents.

                                                                                                                                                                                                                                                        See Also

                                                                                                                                                                                                                                                        • https://git-scm.com/docs/git-cat-file

                                                                                                                                                                                                                                                      method checkIgnore

                                                                                                                                                                                                                                                      checkIgnore: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      pathNames: string[],
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string[]>
                                                                                                                                                                                                                                                      ): Response<string[]>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      path: string,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string[], GitError>
                                                                                                                                                                                                                                                      ): Response<string[]>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Check if a pathname or pathnames are excluded by .gitignore

                                                                                                                                                                                                                                                      method checkIsRepo

                                                                                                                                                                                                                                                      checkIsRepo: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      action?: types.CheckRepoActions,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<boolean>
                                                                                                                                                                                                                                                      ): Response<boolean>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<boolean, GitError>
                                                                                                                                                                                                                                                      ): Response<boolean>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Validates that the current working directory is a valid git repo file path.

                                                                                                                                                                                                                                                        To make a more specific assertion of the repo, add the action argument:

                                                                                                                                                                                                                                                        - bare to validate that the working directory is inside a bare repo. - root to validate that the working directory is the root of a repo. - tree (default value when omitted) to simply validate that the working directory is the descendent of a repo

                                                                                                                                                                                                                                                      method checkout

                                                                                                                                                                                                                                                      checkout: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      what: string,
                                                                                                                                                                                                                                                      options?: types.TaskOptions,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      what: string,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      options?: types.TaskOptions<types.Options>,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Checkout a tag or revision, any number of additional arguments can be passed to the git checkout command by supplying either a string or array of strings as the what parameter.

                                                                                                                                                                                                                                                      method checkoutBranch

                                                                                                                                                                                                                                                      checkoutBranch: (
                                                                                                                                                                                                                                                      branchName: string,
                                                                                                                                                                                                                                                      startPoint: string,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<void>
                                                                                                                                                                                                                                                      ) => Response<void>;
                                                                                                                                                                                                                                                      • Checkout a remote branch.

                                                                                                                                                                                                                                                        - branchName name of branch. - startPoint (e.g origin/development).

                                                                                                                                                                                                                                                      method checkoutLatestTag

                                                                                                                                                                                                                                                      checkoutLatestTag: (
                                                                                                                                                                                                                                                      branchName: string,
                                                                                                                                                                                                                                                      startPoint: string,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<void>
                                                                                                                                                                                                                                                      ) => Response<void>;
                                                                                                                                                                                                                                                      • Internally uses pull and tags to get the list of tags then checks out the latest tag.

                                                                                                                                                                                                                                                      method checkoutLocalBranch

                                                                                                                                                                                                                                                      checkoutLocalBranch: (
                                                                                                                                                                                                                                                      branchName: string,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<void>
                                                                                                                                                                                                                                                      ) => Response<void>;
                                                                                                                                                                                                                                                      • Checkout a local branch

                                                                                                                                                                                                                                                      method clean

                                                                                                                                                                                                                                                      clean: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      args: types.CleanOptions[],
                                                                                                                                                                                                                                                      options?: types.TaskOptions,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.CleanSummary>
                                                                                                                                                                                                                                                      ): Response<resp.CleanSummary>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      mode: string,
                                                                                                                                                                                                                                                      options?: types.TaskOptions<types.Options>,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.CleanSummary, GitError>
                                                                                                                                                                                                                                                      ): Response<resp.CleanSummary>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      mode: string,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.CleanSummary, GitError>
                                                                                                                                                                                                                                                      ): Response<resp.CleanSummary>;
                                                                                                                                                                                                                                                      (options?: types.TaskOptions<types.Options>): Response<resp.CleanSummary>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.CleanSummary, GitError>
                                                                                                                                                                                                                                                      ): Response<resp.CleanSummary>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Deletes unwanted content from the local repo - when supplying the first argument as an array of CleanOptions, the array must include one of CleanOptions.FORCE or CleanOptions.DRY_RUN.

                                                                                                                                                                                                                                                        eg:

                                                                                                                                                                                                                                                        await git.clean(CleanOptions.FORCE);
                                                                                                                                                                                                                                                        await git.clean(CleanOptions.DRY_RUN + CleanOptions.RECURSIVE);
                                                                                                                                                                                                                                                        await git.clean(CleanOptions.FORCE, ['./path']);
                                                                                                                                                                                                                                                        await git.clean(CleanOptions.IGNORED + CleanOptions.FORCE, {'./path': null});

                                                                                                                                                                                                                                                      method clearQueue

                                                                                                                                                                                                                                                      clearQueue: () => this;
                                                                                                                                                                                                                                                      • Clears the queue of pending commands and returns the wrapper instance for chaining.

                                                                                                                                                                                                                                                      method clone

                                                                                                                                                                                                                                                      clone: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      repoPath: string,
                                                                                                                                                                                                                                                      localPath: string,
                                                                                                                                                                                                                                                      options?: types.TaskOptions,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      repoPath: string,
                                                                                                                                                                                                                                                      options?: types.TaskOptions<types.Options>,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Clone a repository into a new directory.

                                                                                                                                                                                                                                                        - repoPath repository url to clone e.g. https://github.com/steveukx/git-js.git - localPath local folder path to clone to. - options supported by [git](https://git-scm.com/docs/git-clone).

                                                                                                                                                                                                                                                      method commit

                                                                                                                                                                                                                                                      commit: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      message: string | string[],
                                                                                                                                                                                                                                                      files?: string | string[],
                                                                                                                                                                                                                                                      options?: types.Options,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.CommitResult>
                                                                                                                                                                                                                                                      ): Response<resp.CommitResult>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      message: string | string[],
                                                                                                                                                                                                                                                      options?: types.TaskOptions<types.Options>,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.CommitResult, GitError>
                                                                                                                                                                                                                                                      ): Response<resp.CommitResult>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      message: string | string[],
                                                                                                                                                                                                                                                      files?: string | string[],
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.CommitResult, GitError>
                                                                                                                                                                                                                                                      ): Response<resp.CommitResult>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      message: string | string[],
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.CommitResult, GitError>
                                                                                                                                                                                                                                                      ): Response<resp.CommitResult>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Commits changes in the current working directory - when specific file paths are supplied, only changes on those files will be committed.

                                                                                                                                                                                                                                                      method customBinary

                                                                                                                                                                                                                                                      customBinary: (command: string) => this;
                                                                                                                                                                                                                                                      • Sets the path to a custom git binary, should either be git when there is an installation of git available on the system path, or a fully qualified path to the executable.

                                                                                                                                                                                                                                                      method deleteLocalBranch

                                                                                                                                                                                                                                                      deleteLocalBranch: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      branchName: string,
                                                                                                                                                                                                                                                      forceDelete?: boolean,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.BranchSingleDeleteResult>
                                                                                                                                                                                                                                                      ): Response<resp.BranchSingleDeleteResult>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      branchName: string,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<
                                                                                                                                                                                                                                                      resp.BranchSingleDeleteResult,
                                                                                                                                                                                                                                                      GitError
                                                                                                                                                                                                                                                      >
                                                                                                                                                                                                                                                      ): Response<resp.BranchSingleDeleteResult>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Delete one local branch. Supply the branchName as a string to return a single BranchDeletionSummary instances.

                                                                                                                                                                                                                                                        - branchName name of branch - forceDelete (optional, defaults to false) set to true to forcibly delete unmerged branches

                                                                                                                                                                                                                                                      method deleteLocalBranches

                                                                                                                                                                                                                                                      deleteLocalBranches: (
                                                                                                                                                                                                                                                      branchNames: string[],
                                                                                                                                                                                                                                                      forceDelete?: boolean,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.BranchMultiDeleteResult>
                                                                                                                                                                                                                                                      ) => Response<resp.BranchMultiDeleteResult>;
                                                                                                                                                                                                                                                      • Delete one or more local branches. Supply the branchName as a string to return a single BranchDeletionSummary or as an array of branch names to return an array of BranchDeletionSummary instances.

                                                                                                                                                                                                                                                        - branchNames name of branch or array of branch names - forceDelete (optional, defaults to false) set to true to forcibly delete unmerged branches

                                                                                                                                                                                                                                                      method diff

                                                                                                                                                                                                                                                      diff: (
                                                                                                                                                                                                                                                      options?: types.TaskOptions,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                      ) => Response<string>;
                                                                                                                                                                                                                                                      • Get the diff of the current repo compared to the last commit with a set of options supplied as a string.

                                                                                                                                                                                                                                                      method diffSummary

                                                                                                                                                                                                                                                      diffSummary: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      command: string | number,
                                                                                                                                                                                                                                                      options: types.TaskOptions,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.DiffResult>
                                                                                                                                                                                                                                                      ): Response<resp.DiffResult>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      command: string | number,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.DiffResult, GitError>
                                                                                                                                                                                                                                                      ): Response<resp.DiffResult>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      options: types.TaskOptions<types.Options>,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.DiffResult, GitError>
                                                                                                                                                                                                                                                      ): Response<resp.DiffResult>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.DiffResult, GitError>
                                                                                                                                                                                                                                                      ): Response<resp.DiffResult>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Gets a summary of the diff for files in the repo, uses the git diff --stat format to calculate changes.

                                                                                                                                                                                                                                                        in order to get staged (only): --cached or --staged.

                                                                                                                                                                                                                                                      method env

                                                                                                                                                                                                                                                      env: { (name: string, value: string): this; (env: object): this };
                                                                                                                                                                                                                                                      • Sets an environment variable for the spawned child process, either supply both a name and value as strings or a single object to entirely replace the current environment variables.

                                                                                                                                                                                                                                                        Parameter name

                                                                                                                                                                                                                                                        Parameter value

                                                                                                                                                                                                                                                      method exec

                                                                                                                                                                                                                                                      exec: (handle: () => void) => Response<void>;
                                                                                                                                                                                                                                                      • Calls the supplied handle function at the next step in the chain, used to run arbitrary functions synchronously before the next task in the git api.

                                                                                                                                                                                                                                                      method fetch

                                                                                                                                                                                                                                                      fetch: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      remote: string,
                                                                                                                                                                                                                                                      branch: string,
                                                                                                                                                                                                                                                      options?: types.TaskOptions,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.FetchResult>
                                                                                                                                                                                                                                                      ): Response<resp.FetchResult>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      remote: string,
                                                                                                                                                                                                                                                      branch: string,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.FetchResult, GitError>
                                                                                                                                                                                                                                                      ): Response<resp.FetchResult>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      remote: string,
                                                                                                                                                                                                                                                      options?: types.TaskOptions<types.Options>,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.FetchResult, GitError>
                                                                                                                                                                                                                                                      ): Response<resp.FetchResult>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      options?: types.TaskOptions<types.Options>,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.FetchResult, GitError>
                                                                                                                                                                                                                                                      ): Response<resp.FetchResult>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.FetchResult, GitError>
                                                                                                                                                                                                                                                      ): Response<resp.FetchResult>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Updates the local working copy database with changes from the default remote repo and branch.

                                                                                                                                                                                                                                                      method getConfig

                                                                                                                                                                                                                                                      getConfig: (
                                                                                                                                                                                                                                                      key: string,
                                                                                                                                                                                                                                                      scope?: keyof typeof types.GitConfigScope,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                      ) => Response<resp.ConfigGetResult>;
                                                                                                                                                                                                                                                      • Gets the current value of a configuration property by it key, optionally specify the scope in which to run the command (omit / set to undefined to check in the complete overlaid configuration visible to the git process).

                                                                                                                                                                                                                                                      method getRemotes

                                                                                                                                                                                                                                                      getRemotes: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<types.RemoteWithoutRefs[]>
                                                                                                                                                                                                                                                      ): Response<types.RemoteWithoutRefs[]>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      verbose?: false,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<
                                                                                                                                                                                                                                                      types.RemoteWithoutRefs[],
                                                                                                                                                                                                                                                      GitError
                                                                                                                                                                                                                                                      >
                                                                                                                                                                                                                                                      ): Response<types.RemoteWithoutRefs[]>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      verbose: true,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<types.RemoteWithRefs[], GitError>
                                                                                                                                                                                                                                                      ): Response<types.RemoteWithRefs[]>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Gets the currently available remotes, setting the optional verbose argument to true includes additional detail on the remotes themselves.

                                                                                                                                                                                                                                                      method listConfig

                                                                                                                                                                                                                                                      listConfig: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      scope: keyof typeof types.GitConfigScope,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.ConfigListSummary>
                                                                                                                                                                                                                                                      ): Response<resp.ConfigListSummary>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.ConfigListSummary, GitError>
                                                                                                                                                                                                                                                      ): Response<resp.ConfigListSummary>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Configuration values visible to git in the current working directory

                                                                                                                                                                                                                                                      method listRemote

                                                                                                                                                                                                                                                      listRemote: (
                                                                                                                                                                                                                                                      args?: types.TaskOptions,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                      ) => Response<string>;
                                                                                                                                                                                                                                                      • List remotes by running the ls-remote command with any number of arbitrary options in either array of object form.

                                                                                                                                                                                                                                                      method log

                                                                                                                                                                                                                                                      log: <T = types.DefaultLogFields>(
                                                                                                                                                                                                                                                      options?: types.TaskOptions | types.LogOptions<T>,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.LogResult<T>>
                                                                                                                                                                                                                                                      ) => Response<resp.LogResult<T>>;
                                                                                                                                                                                                                                                      • Show commit logs from HEAD to the first commit. If provided between options.from and options.to tags or branch.

                                                                                                                                                                                                                                                        You can provide options.file, which is the path to a file in your repository. Then only this file will be considered.

                                                                                                                                                                                                                                                        To use a custom splitter in the log format, set options.splitter to be the string the log should be split on.

                                                                                                                                                                                                                                                        By default the following fields will be part of the result: hash: full commit hash date: author date, ISO 8601-like format message: subject + ref names, like the --decorate option of git-log author_name: author name author_email: author mail You can specify options.format to be an mapping from key to a format option like %H (for commit hash). The fields specified in options.format will be the fields in the result.

                                                                                                                                                                                                                                                        Options can also be supplied as a standard options object for adding custom properties supported by the git log command. For any other set of options, supply options as an array of strings to be appended to the git log command.

                                                                                                                                                                                                                                                        Returns

                                                                                                                                                                                                                                                        Response

                                                                                                                                                                                                                                                        See Also

                                                                                                                                                                                                                                                        • https://git-scm.com/docs/git-log

                                                                                                                                                                                                                                                      method mirror

                                                                                                                                                                                                                                                      mirror: (
                                                                                                                                                                                                                                                      repoPath: string,
                                                                                                                                                                                                                                                      localPath: string,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                      ) => Response<string>;
                                                                                                                                                                                                                                                      • Mirror a git repo

                                                                                                                                                                                                                                                        Equivalent to git.clone(repoPath, localPath, ['--mirror']), clone allows for additional task options.

                                                                                                                                                                                                                                                      method mv

                                                                                                                                                                                                                                                      mv: (
                                                                                                                                                                                                                                                      from: string | string[],
                                                                                                                                                                                                                                                      to: string,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.MoveSummary>
                                                                                                                                                                                                                                                      ) => Response<resp.MoveSummary>;
                                                                                                                                                                                                                                                      • Moves one or more files to a new destination.

                                                                                                                                                                                                                                                        See Also

                                                                                                                                                                                                                                                        • https://git-scm.com/docs/git-mv

                                                                                                                                                                                                                                                      method pull

                                                                                                                                                                                                                                                      pull: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      remote?: string,
                                                                                                                                                                                                                                                      branch?: string,
                                                                                                                                                                                                                                                      options?: types.TaskOptions,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.PullResult>
                                                                                                                                                                                                                                                      ): Response<resp.PullResult>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      options?: types.TaskOptions<types.Options>,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.PullResult, GitError>
                                                                                                                                                                                                                                                      ): Response<resp.PullResult>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.PullResult, GitError>
                                                                                                                                                                                                                                                      ): Response<resp.PullResult>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Fetch from and integrate with another repository or a local branch.

                                                                                                                                                                                                                                                      method pushTags

                                                                                                                                                                                                                                                      pushTags: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      remote: string,
                                                                                                                                                                                                                                                      options?: types.TaskOptions,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.PushResult>
                                                                                                                                                                                                                                                      ): Response<resp.PushResult>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      options?: types.TaskOptions<types.Options>,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.PushResult, GitError>
                                                                                                                                                                                                                                                      ): Response<resp.PushResult>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.PushResult, GitError>
                                                                                                                                                                                                                                                      ): Response<resp.PushResult>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Pushes the current tag changes to a remote which can be either a URL or named remote. When not specified uses the default configured remote spec.

                                                                                                                                                                                                                                                      method raw

                                                                                                                                                                                                                                                      raw: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      commands: string | string[] | types.TaskOptions,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      options: types.TaskOptions<types.Options>,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (...commands: string[]): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      a: string,
                                                                                                                                                                                                                                                      options: types.TaskOptions<types.Options>,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      a: string,
                                                                                                                                                                                                                                                      b: string,
                                                                                                                                                                                                                                                      options: types.TaskOptions<types.Options>,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      a: string,
                                                                                                                                                                                                                                                      b: string,
                                                                                                                                                                                                                                                      c: string,
                                                                                                                                                                                                                                                      options: types.TaskOptions<types.Options>,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      a: string,
                                                                                                                                                                                                                                                      b: string,
                                                                                                                                                                                                                                                      c: string,
                                                                                                                                                                                                                                                      d: string,
                                                                                                                                                                                                                                                      options: types.TaskOptions<types.Options>,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      a: string,
                                                                                                                                                                                                                                                      b: string,
                                                                                                                                                                                                                                                      c: string,
                                                                                                                                                                                                                                                      d: string,
                                                                                                                                                                                                                                                      e: string,
                                                                                                                                                                                                                                                      options: types.TaskOptions<types.Options>,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      a: string,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      a: string,
                                                                                                                                                                                                                                                      b: string,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      a: string,
                                                                                                                                                                                                                                                      b: string,
                                                                                                                                                                                                                                                      c: string,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      a: string,
                                                                                                                                                                                                                                                      b: string,
                                                                                                                                                                                                                                                      c: string,
                                                                                                                                                                                                                                                      d: string,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      a: string,
                                                                                                                                                                                                                                                      b: string,
                                                                                                                                                                                                                                                      c: string,
                                                                                                                                                                                                                                                      d: string,
                                                                                                                                                                                                                                                      e: string,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Executes any command against the git binary.

                                                                                                                                                                                                                                                      method rebase

                                                                                                                                                                                                                                                      rebase: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      options?: types.TaskOptions,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (callback?: types.SimpleGitTaskCallback<string, GitError>): Response<string>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Rebases the current working copy. Options can be supplied either as an array of string parameters to be sent to the git rebase command, or a standard options object.

                                                                                                                                                                                                                                                      method remote

                                                                                                                                                                                                                                                      remote: (
                                                                                                                                                                                                                                                      options: string[],
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<void | string>
                                                                                                                                                                                                                                                      ) => Response<void | string>;
                                                                                                                                                                                                                                                      • Call any git remote function with arguments passed as an array of strings.

                                                                                                                                                                                                                                                      method removeRemote

                                                                                                                                                                                                                                                      removeRemote: (
                                                                                                                                                                                                                                                      remoteName: string,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<void>
                                                                                                                                                                                                                                                      ) => Response<void>;
                                                                                                                                                                                                                                                      • Removes an entry from the list of remotes.

                                                                                                                                                                                                                                                        - remoteName Name of the repository - eg "upstream"

                                                                                                                                                                                                                                                      method reset

                                                                                                                                                                                                                                                      reset: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      mode: types.ResetMode,
                                                                                                                                                                                                                                                      options?: types.TaskOptions<types.ResetOptions>,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      mode: types.ResetMode,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      options?: types.TaskOptions<types.ResetOptions>,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Reset a repo. Called without arguments this is a soft reset for the whole repo, for explicitly setting the reset mode, supply the first argument as one of the supported reset modes.

                                                                                                                                                                                                                                                        Trailing options argument can be either a string array, or an extension of the ResetOptions, use this argument for supplying arbitrary additional arguments, such as restricting the pathspec.

                                                                                                                                                                                                                                                        // equivalent to each other
                                                                                                                                                                                                                                                        simpleGit().reset(ResetMode.HARD, ['--', 'my-file.txt']);
                                                                                                                                                                                                                                                        simpleGit().reset(['--hard', '--', 'my-file.txt']);
                                                                                                                                                                                                                                                        simpleGit().reset(ResetMode.HARD, {'--': null, 'my-file.txt': null});
                                                                                                                                                                                                                                                        simpleGit().reset({'--hard': null, '--': null, 'my-file.txt': null});

                                                                                                                                                                                                                                                      method revert

                                                                                                                                                                                                                                                      revert: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      commit: String,
                                                                                                                                                                                                                                                      options?: types.TaskOptions,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<void>
                                                                                                                                                                                                                                                      ): Response<void>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      commit: String,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<void, GitError>
                                                                                                                                                                                                                                                      ): Response<void>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Revert one or more commits in the local working copy

                                                                                                                                                                                                                                                        - commit The commit to revert. Can be any hash, offset (eg: HEAD~2) or range (eg: master~5..master~2)

                                                                                                                                                                                                                                                      method revparse

                                                                                                                                                                                                                                                      revparse: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      option: string,
                                                                                                                                                                                                                                                      options?: types.TaskOptions,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      options?: types.TaskOptions<types.Options>,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Passes the supplied options to git rev-parse and returns the string response. Options can be either a string array or Options object of options compatible with the [rev-parse](https://git-scm.com/docs/git-rev-parse)

                                                                                                                                                                                                                                                        Example uses of rev-parse include converting friendly commit references (ie: branch names) to SHA1 hashes and retrieving meta details about the current repo (eg: the root directory, and whether it was created as a bare repo).

                                                                                                                                                                                                                                                      method rm

                                                                                                                                                                                                                                                      rm: (
                                                                                                                                                                                                                                                      paths: string | string[],
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<void>
                                                                                                                                                                                                                                                      ) => Response<void>;
                                                                                                                                                                                                                                                      • Removes the named files from source control.

                                                                                                                                                                                                                                                      method rmKeepLocal

                                                                                                                                                                                                                                                      rmKeepLocal: (
                                                                                                                                                                                                                                                      paths: string | string[],
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<void>
                                                                                                                                                                                                                                                      ) => Response<void>;
                                                                                                                                                                                                                                                      • Removes the named files from source control but keeps them on disk rather than deleting them entirely. To completely remove the files, use rm.

                                                                                                                                                                                                                                                      method show

                                                                                                                                                                                                                                                      show: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      option: string | types.TaskOptions,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (callback?: types.SimpleGitTaskCallback<string, GitError>): Response<string>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Show various types of objects, for example the file at a certain commit

                                                                                                                                                                                                                                                      method silent

                                                                                                                                                                                                                                                      silent: (silence?: boolean) => this;
                                                                                                                                                                                                                                                      • Parameter silence

                                                                                                                                                                                                                                                        Deprecated

                                                                                                                                                                                                                                                        From version 2.7.0, use of silent is deprecated in favour of using the debug library, this method will be removed in version 3.x.

                                                                                                                                                                                                                                                        Please see the [readme](https://github.com/steveukx/git-js/blob/master/readme.md#enable-logging) for more details.

                                                                                                                                                                                                                                                        Disables/enables the use of the console for printing warnings and errors, by default messages are not shown in a production environment.

                                                                                                                                                                                                                                                      method stashList

                                                                                                                                                                                                                                                      stashList: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      options?: types.TaskOptions,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.LogResult>
                                                                                                                                                                                                                                                      ): Response<resp.LogResult>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<
                                                                                                                                                                                                                                                      resp.LogResult<types.DefaultLogFields>,
                                                                                                                                                                                                                                                      GitError
                                                                                                                                                                                                                                                      >
                                                                                                                                                                                                                                                      ): Response<resp.LogResult<types.DefaultLogFields>>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • List the stash(s) of the local repo

                                                                                                                                                                                                                                                      method subModule

                                                                                                                                                                                                                                                      subModule: (
                                                                                                                                                                                                                                                      options?: types.TaskOptions,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                      ) => Response<string>;
                                                                                                                                                                                                                                                      • Call any git submodule function with arguments passed as an array of strings.

                                                                                                                                                                                                                                                      method submoduleAdd

                                                                                                                                                                                                                                                      submoduleAdd: (
                                                                                                                                                                                                                                                      repo: string,
                                                                                                                                                                                                                                                      path: string,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                      ) => Response<string>;
                                                                                                                                                                                                                                                      • Add a submodule

                                                                                                                                                                                                                                                      method submoduleInit

                                                                                                                                                                                                                                                      submoduleInit: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      moduleName: string,
                                                                                                                                                                                                                                                      options?: types.TaskOptions,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      moduleName: string,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      options?: types.TaskOptions<types.Options>,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (callback?: types.SimpleGitTaskCallback<string, GitError>): Response<string>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Initialise submodules

                                                                                                                                                                                                                                                      method submoduleUpdate

                                                                                                                                                                                                                                                      submoduleUpdate: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      moduleName: string,
                                                                                                                                                                                                                                                      options?: types.TaskOptions,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      moduleName: string,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      options?: types.TaskOptions<types.Options>,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                      ): Response<string>;
                                                                                                                                                                                                                                                      (callback?: types.SimpleGitTaskCallback<string, GitError>): Response<string>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Update submodules

                                                                                                                                                                                                                                                      method tag

                                                                                                                                                                                                                                                      tag: (
                                                                                                                                                                                                                                                      options?: types.TaskOptions,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                      ) => Response<string>;
                                                                                                                                                                                                                                                      • List all tags. When using git 2.7.0 or above, include an options object with "--sort": "property-name" to sort the tags by that property instead of using the default semantic versioning sort.

                                                                                                                                                                                                                                                        Note, supplying this option when it is not supported by your Git version will cause the operation to fail.

                                                                                                                                                                                                                                                      method tags

                                                                                                                                                                                                                                                      tags: {
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      options?: types.TaskOptions,
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.TagResult>
                                                                                                                                                                                                                                                      ): Response<resp.TagResult>;
                                                                                                                                                                                                                                                      (
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<resp.TagResult, GitError>
                                                                                                                                                                                                                                                      ): Response<resp.TagResult>;
                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                      • Gets a list of tagged versions.

                                                                                                                                                                                                                                                      method updateServerInfo

                                                                                                                                                                                                                                                      updateServerInfo: (
                                                                                                                                                                                                                                                      callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                      ) => Response<string>;
                                                                                                                                                                                                                                                      • Updates repository server info

                                                                                                                                                                                                                                                      interface SimpleGitBase

                                                                                                                                                                                                                                                      interface SimpleGitBase {}

                                                                                                                                                                                                                                                        method add

                                                                                                                                                                                                                                                        add: (
                                                                                                                                                                                                                                                        files: string | string[],
                                                                                                                                                                                                                                                        callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                        ) => Response<string>;
                                                                                                                                                                                                                                                        • Adds one or more files to source control

                                                                                                                                                                                                                                                        method cwd

                                                                                                                                                                                                                                                        cwd: {
                                                                                                                                                                                                                                                        (
                                                                                                                                                                                                                                                        directory: { path: string; root?: boolean },
                                                                                                                                                                                                                                                        callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                        ): Response<string>;
                                                                                                                                                                                                                                                        <path extends string>(
                                                                                                                                                                                                                                                        directory: path,
                                                                                                                                                                                                                                                        callback?: types.SimpleGitTaskCallback<path, GitError>
                                                                                                                                                                                                                                                        ): Response<path>;
                                                                                                                                                                                                                                                        };
                                                                                                                                                                                                                                                        • Sets the working directory of the subsequent commands.

                                                                                                                                                                                                                                                        method hashObject

                                                                                                                                                                                                                                                        hashObject: {
                                                                                                                                                                                                                                                        (path: string, callback?: types.SimpleGitTaskCallback): Response<string>;
                                                                                                                                                                                                                                                        (
                                                                                                                                                                                                                                                        path: string,
                                                                                                                                                                                                                                                        write?: boolean,
                                                                                                                                                                                                                                                        callback?: types.SimpleGitTaskCallback<string, GitError>
                                                                                                                                                                                                                                                        ): Response<string>;
                                                                                                                                                                                                                                                        };
                                                                                                                                                                                                                                                        • Compute object ID from a file

                                                                                                                                                                                                                                                        method init

                                                                                                                                                                                                                                                        init: {
                                                                                                                                                                                                                                                        (
                                                                                                                                                                                                                                                        bare: boolean,
                                                                                                                                                                                                                                                        options?: types.TaskOptions,
                                                                                                                                                                                                                                                        callback?: types.SimpleGitTaskCallback<resp.InitResult>
                                                                                                                                                                                                                                                        ): Response<resp.InitResult>;
                                                                                                                                                                                                                                                        (
                                                                                                                                                                                                                                                        bare: boolean,
                                                                                                                                                                                                                                                        callback?: types.SimpleGitTaskCallback<resp.InitResult, GitError>
                                                                                                                                                                                                                                                        ): Response<resp.InitResult>;
                                                                                                                                                                                                                                                        (
                                                                                                                                                                                                                                                        options?: types.TaskOptions<types.Options>,
                                                                                                                                                                                                                                                        callback?: types.SimpleGitTaskCallback<resp.InitResult, GitError>
                                                                                                                                                                                                                                                        ): Response<resp.InitResult>;
                                                                                                                                                                                                                                                        (
                                                                                                                                                                                                                                                        callback?: types.SimpleGitTaskCallback<resp.InitResult, GitError>
                                                                                                                                                                                                                                                        ): Response<resp.InitResult>;
                                                                                                                                                                                                                                                        };
                                                                                                                                                                                                                                                        • Initialize a git repo

                                                                                                                                                                                                                                                        method merge

                                                                                                                                                                                                                                                        merge: (
                                                                                                                                                                                                                                                        options: types.TaskOptions,
                                                                                                                                                                                                                                                        callback?: types.SimpleGitTaskCallback<resp.MergeResult>
                                                                                                                                                                                                                                                        ) => Response<resp.MergeResult>;
                                                                                                                                                                                                                                                        • Runs a merge, options can be either an array of arguments supported by the [git merge](https://git-scm.com/docs/git-merge) or an options object.

                                                                                                                                                                                                                                                          Conflicts during the merge result in an error response, the response type whether it was an error or success will be a MergeSummary instance. When successful, the MergeSummary has all detail from a the PullSummary

                                                                                                                                                                                                                                                          See Also

                                                                                                                                                                                                                                                          • https://github.com/steveukx/git-js/blob/master/src/responses/MergeSummary.js

                                                                                                                                                                                                                                                          • https://github.com/steveukx/git-js/blob/master/src/responses/PullSummary.js

                                                                                                                                                                                                                                                        method mergeFromTo

                                                                                                                                                                                                                                                        mergeFromTo: {
                                                                                                                                                                                                                                                        <E extends GitError>(
                                                                                                                                                                                                                                                        remote: string,
                                                                                                                                                                                                                                                        branch: string,
                                                                                                                                                                                                                                                        options?: types.TaskOptions,
                                                                                                                                                                                                                                                        callback?: types.SimpleGitTaskCallback<resp.MergeResult, E>
                                                                                                                                                                                                                                                        ): Response<resp.MergeResult>;
                                                                                                                                                                                                                                                        <E extends GitError>(
                                                                                                                                                                                                                                                        remote: string,
                                                                                                                                                                                                                                                        branch: string,
                                                                                                                                                                                                                                                        callback?: types.SimpleGitTaskCallback<resp.MergeResult, E>
                                                                                                                                                                                                                                                        ): Response<resp.MergeResult>;
                                                                                                                                                                                                                                                        };
                                                                                                                                                                                                                                                        • Merges from one branch to another, equivalent to running git merge ${remote} ${branch}, the options argument can either be an array of additional parameters to pass to the command or null / omitted to be ignored.

                                                                                                                                                                                                                                                        method outputHandler

                                                                                                                                                                                                                                                        outputHandler: (handler: types.outputHandler | void) => this;
                                                                                                                                                                                                                                                        • Sets a handler function to be called whenever a new child process is created, the handler function will be called with the name of the command being run and the stdout & stderr streams used by the ChildProcess.

                                                                                                                                                                                                                                                          Example 1

                                                                                                                                                                                                                                                          require('simple-git') .outputHandler(function (command, stdout, stderr) { stdout.pipe(process.stdout); }) .checkout('https://github.com/user/repo.git');

                                                                                                                                                                                                                                                          See Also

                                                                                                                                                                                                                                                          • https://nodejs.org/api/child_process.html#child_process_class_childprocess

                                                                                                                                                                                                                                                          • https://nodejs.org/api/stream.html#stream_class_stream_readable

                                                                                                                                                                                                                                                        method push

                                                                                                                                                                                                                                                        push: {
                                                                                                                                                                                                                                                        (
                                                                                                                                                                                                                                                        remote?: string,
                                                                                                                                                                                                                                                        branch?: string,
                                                                                                                                                                                                                                                        options?: types.TaskOptions,
                                                                                                                                                                                                                                                        callback?: types.SimpleGitTaskCallback<resp.PushResult>
                                                                                                                                                                                                                                                        ): Response<resp.PushResult>;
                                                                                                                                                                                                                                                        (
                                                                                                                                                                                                                                                        options?: types.TaskOptions<types.Options>,
                                                                                                                                                                                                                                                        callback?: types.SimpleGitTaskCallback<resp.PushResult, GitError>
                                                                                                                                                                                                                                                        ): Response<resp.PushResult>;
                                                                                                                                                                                                                                                        (
                                                                                                                                                                                                                                                        callback?: types.SimpleGitTaskCallback<resp.PushResult, GitError>
                                                                                                                                                                                                                                                        ): Response<resp.PushResult>;
                                                                                                                                                                                                                                                        };
                                                                                                                                                                                                                                                        • Pushes the current committed changes to a remote, optionally specify the names of the remote and branch to use when pushing. Supply multiple options as an array of strings in the first argument - see examples below.

                                                                                                                                                                                                                                                        method stash

                                                                                                                                                                                                                                                        stash: {
                                                                                                                                                                                                                                                        (
                                                                                                                                                                                                                                                        options?: types.TaskOptions,
                                                                                                                                                                                                                                                        callback?: types.SimpleGitTaskCallback<string>
                                                                                                                                                                                                                                                        ): Response<string>;
                                                                                                                                                                                                                                                        (callback?: types.SimpleGitTaskCallback<string, GitError>): Response<string>;
                                                                                                                                                                                                                                                        };
                                                                                                                                                                                                                                                        • Stash the local repo

                                                                                                                                                                                                                                                        method status

                                                                                                                                                                                                                                                        status: {
                                                                                                                                                                                                                                                        (
                                                                                                                                                                                                                                                        options?: types.TaskOptions,
                                                                                                                                                                                                                                                        callback?: types.SimpleGitTaskCallback<resp.StatusResult>
                                                                                                                                                                                                                                                        ): Response<resp.StatusResult>;
                                                                                                                                                                                                                                                        (
                                                                                                                                                                                                                                                        callback?: types.SimpleGitTaskCallback<resp.StatusResult, GitError>
                                                                                                                                                                                                                                                        ): Response<resp.StatusResult>;
                                                                                                                                                                                                                                                        };
                                                                                                                                                                                                                                                        • Show the working tree status.

                                                                                                                                                                                                                                                        interface SimpleGitFactory

                                                                                                                                                                                                                                                        interface SimpleGitFactory {}

                                                                                                                                                                                                                                                          call signature

                                                                                                                                                                                                                                                          (baseDir?: string, options?: Partial<types.SimpleGitOptions>): SimpleGit;

                                                                                                                                                                                                                                                            call signature

                                                                                                                                                                                                                                                            (baseDir: string): SimpleGit;

                                                                                                                                                                                                                                                              call signature

                                                                                                                                                                                                                                                              (options: Partial<types.SimpleGitOptions>): SimpleGit;

                                                                                                                                                                                                                                                                interface SimpleGitOptions

                                                                                                                                                                                                                                                                interface SimpleGitOptions extends Partial<SimpleGitPluginConfig> {}
                                                                                                                                                                                                                                                                • Optional configuration settings to be passed to the simpleGit builder.

                                                                                                                                                                                                                                                                property baseDir

                                                                                                                                                                                                                                                                baseDir: string;

                                                                                                                                                                                                                                                                  property binary

                                                                                                                                                                                                                                                                  binary: string;

                                                                                                                                                                                                                                                                    property config

                                                                                                                                                                                                                                                                    config: string[];

                                                                                                                                                                                                                                                                      property maxConcurrentProcesses

                                                                                                                                                                                                                                                                      maxConcurrentProcesses: number;

                                                                                                                                                                                                                                                                        interface SimpleGitProgressEvent

                                                                                                                                                                                                                                                                        interface SimpleGitProgressEvent {}
                                                                                                                                                                                                                                                                        • The event data emitted to the progress handler whenever progress detail is received.

                                                                                                                                                                                                                                                                        property method

                                                                                                                                                                                                                                                                        method: string;
                                                                                                                                                                                                                                                                        • The underlying method called - push, pull etc

                                                                                                                                                                                                                                                                        property processed

                                                                                                                                                                                                                                                                        processed: number;
                                                                                                                                                                                                                                                                        • The number of items processed so far

                                                                                                                                                                                                                                                                        property progress

                                                                                                                                                                                                                                                                        progress: number;
                                                                                                                                                                                                                                                                        • The percent progressed as a number 0 - 100

                                                                                                                                                                                                                                                                        property stage

                                                                                                                                                                                                                                                                        stage:
                                                                                                                                                                                                                                                                        | 'compressing'
                                                                                                                                                                                                                                                                        | 'counting'
                                                                                                                                                                                                                                                                        | 'receiving'
                                                                                                                                                                                                                                                                        | 'resolving'
                                                                                                                                                                                                                                                                        | 'unknown'
                                                                                                                                                                                                                                                                        | 'writing'
                                                                                                                                                                                                                                                                        | string;
                                                                                                                                                                                                                                                                        • The type of progress being reported, note that any one task may emit many stages - for example git clone emits both receiving and resolving

                                                                                                                                                                                                                                                                        property total

                                                                                                                                                                                                                                                                        total: number;
                                                                                                                                                                                                                                                                        • The total number of items to be processed

                                                                                                                                                                                                                                                                        interface StatusResult

                                                                                                                                                                                                                                                                        interface StatusResult {}
                                                                                                                                                                                                                                                                        • The StatusResult is returned for calls to git.status(), represents the state of the working directory.

                                                                                                                                                                                                                                                                        property ahead

                                                                                                                                                                                                                                                                        ahead: number;

                                                                                                                                                                                                                                                                          property behind

                                                                                                                                                                                                                                                                          behind: number;

                                                                                                                                                                                                                                                                            property conflicted

                                                                                                                                                                                                                                                                            conflicted: string[];

                                                                                                                                                                                                                                                                              property created

                                                                                                                                                                                                                                                                              created: string[];

                                                                                                                                                                                                                                                                                property current

                                                                                                                                                                                                                                                                                current: string | null;

                                                                                                                                                                                                                                                                                  property deleted

                                                                                                                                                                                                                                                                                  deleted: string[];

                                                                                                                                                                                                                                                                                    property files

                                                                                                                                                                                                                                                                                    files: FileStatusResult[];

                                                                                                                                                                                                                                                                                      property modified

                                                                                                                                                                                                                                                                                      modified: string[];

                                                                                                                                                                                                                                                                                        property not_added

                                                                                                                                                                                                                                                                                        not_added: string[];

                                                                                                                                                                                                                                                                                          property renamed

                                                                                                                                                                                                                                                                                          renamed: StatusResultRenamed[];

                                                                                                                                                                                                                                                                                            property staged

                                                                                                                                                                                                                                                                                            staged: string[];

                                                                                                                                                                                                                                                                                              property tracking

                                                                                                                                                                                                                                                                                              tracking: string | null;

                                                                                                                                                                                                                                                                                                method isClean

                                                                                                                                                                                                                                                                                                isClean: () => boolean;
                                                                                                                                                                                                                                                                                                • Gets whether this represents a clean working branch.

                                                                                                                                                                                                                                                                                                interface StatusResultRenamed

                                                                                                                                                                                                                                                                                                interface StatusResultRenamed {}
                                                                                                                                                                                                                                                                                                • Represents file name changes in a StatusResult

                                                                                                                                                                                                                                                                                                property from

                                                                                                                                                                                                                                                                                                from: string;

                                                                                                                                                                                                                                                                                                  property to

                                                                                                                                                                                                                                                                                                  to: string;

                                                                                                                                                                                                                                                                                                    interface TagResult

                                                                                                                                                                                                                                                                                                    interface TagResult {}
                                                                                                                                                                                                                                                                                                    • Response retrieved when using the git.tags method

                                                                                                                                                                                                                                                                                                    property all

                                                                                                                                                                                                                                                                                                    all: string[];
                                                                                                                                                                                                                                                                                                    • All tag names

                                                                                                                                                                                                                                                                                                    property latest

                                                                                                                                                                                                                                                                                                    latest: string | undefined;
                                                                                                                                                                                                                                                                                                    • The semver latest tag name or undefined when no tags are named in the response

                                                                                                                                                                                                                                                                                                    Enums

                                                                                                                                                                                                                                                                                                    enum CheckRepoActions

                                                                                                                                                                                                                                                                                                    enum CheckRepoActions {
                                                                                                                                                                                                                                                                                                    BARE = 'bare',
                                                                                                                                                                                                                                                                                                    IN_TREE = 'tree',
                                                                                                                                                                                                                                                                                                    IS_REPO_ROOT = 'root',
                                                                                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                                                                                      member BARE

                                                                                                                                                                                                                                                                                                      BARE = 'bare'

                                                                                                                                                                                                                                                                                                        member IN_TREE

                                                                                                                                                                                                                                                                                                        IN_TREE = 'tree'

                                                                                                                                                                                                                                                                                                          member IS_REPO_ROOT

                                                                                                                                                                                                                                                                                                          IS_REPO_ROOT = 'root'

                                                                                                                                                                                                                                                                                                            enum CleanOptions

                                                                                                                                                                                                                                                                                                            enum CleanOptions {
                                                                                                                                                                                                                                                                                                            DRY_RUN = 'n',
                                                                                                                                                                                                                                                                                                            FORCE = 'f',
                                                                                                                                                                                                                                                                                                            IGNORED_INCLUDED = 'x',
                                                                                                                                                                                                                                                                                                            IGNORED_ONLY = 'X',
                                                                                                                                                                                                                                                                                                            EXCLUDING = 'e',
                                                                                                                                                                                                                                                                                                            QUIET = 'q',
                                                                                                                                                                                                                                                                                                            RECURSIVE = 'd',
                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                            • All supported option switches available for use in a git.clean operation

                                                                                                                                                                                                                                                                                                            member DRY_RUN

                                                                                                                                                                                                                                                                                                            DRY_RUN = 'n'

                                                                                                                                                                                                                                                                                                              member EXCLUDING

                                                                                                                                                                                                                                                                                                              EXCLUDING = 'e'

                                                                                                                                                                                                                                                                                                                member FORCE

                                                                                                                                                                                                                                                                                                                FORCE = 'f'

                                                                                                                                                                                                                                                                                                                  member IGNORED_INCLUDED

                                                                                                                                                                                                                                                                                                                  IGNORED_INCLUDED = 'x'

                                                                                                                                                                                                                                                                                                                    member IGNORED_ONLY

                                                                                                                                                                                                                                                                                                                    IGNORED_ONLY = 'X'

                                                                                                                                                                                                                                                                                                                      member QUIET

                                                                                                                                                                                                                                                                                                                      QUIET = 'q'

                                                                                                                                                                                                                                                                                                                        member RECURSIVE

                                                                                                                                                                                                                                                                                                                        RECURSIVE = 'd'

                                                                                                                                                                                                                                                                                                                          enum GitConfigScope

                                                                                                                                                                                                                                                                                                                          enum GitConfigScope {
                                                                                                                                                                                                                                                                                                                          system = 'system',
                                                                                                                                                                                                                                                                                                                          global = 'global',
                                                                                                                                                                                                                                                                                                                          local = 'local',
                                                                                                                                                                                                                                                                                                                          worktree = 'worktree',
                                                                                                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                                                                                                            member global

                                                                                                                                                                                                                                                                                                                            global = 'global'

                                                                                                                                                                                                                                                                                                                              member local

                                                                                                                                                                                                                                                                                                                              local = 'local'

                                                                                                                                                                                                                                                                                                                                member system

                                                                                                                                                                                                                                                                                                                                system = 'system'

                                                                                                                                                                                                                                                                                                                                  member worktree

                                                                                                                                                                                                                                                                                                                                  worktree = 'worktree'

                                                                                                                                                                                                                                                                                                                                    enum ResetMode

                                                                                                                                                                                                                                                                                                                                    enum ResetMode {
                                                                                                                                                                                                                                                                                                                                    MIXED = 'mixed',
                                                                                                                                                                                                                                                                                                                                    SOFT = 'soft',
                                                                                                                                                                                                                                                                                                                                    HARD = 'hard',
                                                                                                                                                                                                                                                                                                                                    MERGE = 'merge',
                                                                                                                                                                                                                                                                                                                                    KEEP = 'keep',
                                                                                                                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                                                                                                                      member HARD

                                                                                                                                                                                                                                                                                                                                      HARD = 'hard'

                                                                                                                                                                                                                                                                                                                                        member KEEP

                                                                                                                                                                                                                                                                                                                                        KEEP = 'keep'

                                                                                                                                                                                                                                                                                                                                          member MERGE

                                                                                                                                                                                                                                                                                                                                          MERGE = 'merge'

                                                                                                                                                                                                                                                                                                                                            member MIXED

                                                                                                                                                                                                                                                                                                                                            MIXED = 'mixed'

                                                                                                                                                                                                                                                                                                                                              member SOFT

                                                                                                                                                                                                                                                                                                                                              SOFT = 'soft'

                                                                                                                                                                                                                                                                                                                                                Type Aliases

                                                                                                                                                                                                                                                                                                                                                type ApplyOptions

                                                                                                                                                                                                                                                                                                                                                type ApplyOptions = Options &
                                                                                                                                                                                                                                                                                                                                                OptionFlags<
                                                                                                                                                                                                                                                                                                                                                | '--stat'
                                                                                                                                                                                                                                                                                                                                                | '--numstat'
                                                                                                                                                                                                                                                                                                                                                | '--summary'
                                                                                                                                                                                                                                                                                                                                                | '--check'
                                                                                                                                                                                                                                                                                                                                                | '--index'
                                                                                                                                                                                                                                                                                                                                                | '--intent-to-add'
                                                                                                                                                                                                                                                                                                                                                | '--3way'
                                                                                                                                                                                                                                                                                                                                                | '--apply'
                                                                                                                                                                                                                                                                                                                                                | '--no-add'
                                                                                                                                                                                                                                                                                                                                                | '-R'
                                                                                                                                                                                                                                                                                                                                                | '--reverse'
                                                                                                                                                                                                                                                                                                                                                | '--allow-binary-replacement'
                                                                                                                                                                                                                                                                                                                                                | '--binary'
                                                                                                                                                                                                                                                                                                                                                | '--reject'
                                                                                                                                                                                                                                                                                                                                                | '-z'
                                                                                                                                                                                                                                                                                                                                                | '--inaccurate-eof'
                                                                                                                                                                                                                                                                                                                                                | '--recount'
                                                                                                                                                                                                                                                                                                                                                | '--cached'
                                                                                                                                                                                                                                                                                                                                                | '--ignore-space-change'
                                                                                                                                                                                                                                                                                                                                                | '--ignore-whitespace'
                                                                                                                                                                                                                                                                                                                                                | '--verbose'
                                                                                                                                                                                                                                                                                                                                                | '--unsafe-paths'
                                                                                                                                                                                                                                                                                                                                                > &
                                                                                                                                                                                                                                                                                                                                                OptionFlags<'--whitespace', 'nowarn' | 'warn' | 'fix' | 'error' | 'error-all'> &
                                                                                                                                                                                                                                                                                                                                                OptionFlags<
                                                                                                                                                                                                                                                                                                                                                '--build-fake-ancestor' | '--exclude' | '--include' | '--directory',
                                                                                                                                                                                                                                                                                                                                                string
                                                                                                                                                                                                                                                                                                                                                > &
                                                                                                                                                                                                                                                                                                                                                OptionFlags<'-p' | '-C', number>;

                                                                                                                                                                                                                                                                                                                                                  type BranchDeletionBatchSummary

                                                                                                                                                                                                                                                                                                                                                  type BranchDeletionBatchSummary = BranchMultiDeleteResult;
                                                                                                                                                                                                                                                                                                                                                  • Deprecated

                                                                                                                                                                                                                                                                                                                                                    to aid consistent naming, please use BranchMultiDeleteResult instead of BranchDeletionBatchSummary.

                                                                                                                                                                                                                                                                                                                                                  type BranchDeletionSummary

                                                                                                                                                                                                                                                                                                                                                  type BranchDeletionSummary = BranchSingleDeleteResult;
                                                                                                                                                                                                                                                                                                                                                  • Deprecated

                                                                                                                                                                                                                                                                                                                                                    to aid consistent naming, please use BranchSingleDeleteResult instead of BranchDeletionSummary.

                                                                                                                                                                                                                                                                                                                                                  type BranchSingleDeleteResult

                                                                                                                                                                                                                                                                                                                                                  type BranchSingleDeleteResult =
                                                                                                                                                                                                                                                                                                                                                  | BranchSingleDeleteFailure
                                                                                                                                                                                                                                                                                                                                                  | BranchSingleDeleteSuccess;

                                                                                                                                                                                                                                                                                                                                                    type CleanMode

                                                                                                                                                                                                                                                                                                                                                    type CleanMode = CleanOptions.FORCE | CleanOptions.DRY_RUN;
                                                                                                                                                                                                                                                                                                                                                    • The two modes git.clean can run in - one of these must be supplied in order for the command to not throw a TaskConfigurationError

                                                                                                                                                                                                                                                                                                                                                    type CloneOptions

                                                                                                                                                                                                                                                                                                                                                    type CloneOptions = Options &
                                                                                                                                                                                                                                                                                                                                                    OptionFlags<
                                                                                                                                                                                                                                                                                                                                                    | '--bare'
                                                                                                                                                                                                                                                                                                                                                    | '--dissociate'
                                                                                                                                                                                                                                                                                                                                                    | '--mirror'
                                                                                                                                                                                                                                                                                                                                                    | '--no-checkout'
                                                                                                                                                                                                                                                                                                                                                    | '--no-remote-submodules'
                                                                                                                                                                                                                                                                                                                                                    | '--no-shallow-submodules'
                                                                                                                                                                                                                                                                                                                                                    | '--no-single-branch'
                                                                                                                                                                                                                                                                                                                                                    | '--no-tags'
                                                                                                                                                                                                                                                                                                                                                    | '--remote-submodules'
                                                                                                                                                                                                                                                                                                                                                    | '--single-branch'
                                                                                                                                                                                                                                                                                                                                                    | '--shallow-submodules'
                                                                                                                                                                                                                                                                                                                                                    | '--verbose'
                                                                                                                                                                                                                                                                                                                                                    > &
                                                                                                                                                                                                                                                                                                                                                    OptionFlags<'--depth' | '-j' | '--jobs', number> &
                                                                                                                                                                                                                                                                                                                                                    OptionFlags<
                                                                                                                                                                                                                                                                                                                                                    | '--branch'
                                                                                                                                                                                                                                                                                                                                                    | '--origin'
                                                                                                                                                                                                                                                                                                                                                    | '--recurse-submodules'
                                                                                                                                                                                                                                                                                                                                                    | '--separate-git-dir'
                                                                                                                                                                                                                                                                                                                                                    | '--shallow-exclude'
                                                                                                                                                                                                                                                                                                                                                    | '--shallow-since'
                                                                                                                                                                                                                                                                                                                                                    | '--template',
                                                                                                                                                                                                                                                                                                                                                    string
                                                                                                                                                                                                                                                                                                                                                    >;

                                                                                                                                                                                                                                                                                                                                                      type CommitSummary

                                                                                                                                                                                                                                                                                                                                                      type CommitSummary = CommitResult;
                                                                                                                                                                                                                                                                                                                                                      • Deprecated

                                                                                                                                                                                                                                                                                                                                                        For consistent naming, please use CommitResult instead of CommitSummary

                                                                                                                                                                                                                                                                                                                                                      type ListLogSummary

                                                                                                                                                                                                                                                                                                                                                      type ListLogSummary<T = DefaultLogFields> = LogResult<T>;
                                                                                                                                                                                                                                                                                                                                                      • Deprecated

                                                                                                                                                                                                                                                                                                                                                        to aid consistent naming, please use LogResult instead of ListLogSummary.

                                                                                                                                                                                                                                                                                                                                                      type LogOptions

                                                                                                                                                                                                                                                                                                                                                      type LogOptions<T = DefaultLogFields> = {
                                                                                                                                                                                                                                                                                                                                                      file?: string;
                                                                                                                                                                                                                                                                                                                                                      format?: T;
                                                                                                                                                                                                                                                                                                                                                      from?: string;
                                                                                                                                                                                                                                                                                                                                                      mailMap?: boolean;
                                                                                                                                                                                                                                                                                                                                                      maxCount?: number;
                                                                                                                                                                                                                                                                                                                                                      multiLine?: boolean;
                                                                                                                                                                                                                                                                                                                                                      splitter?: string;
                                                                                                                                                                                                                                                                                                                                                      strictDate?: boolean;
                                                                                                                                                                                                                                                                                                                                                      symmetric?: boolean;
                                                                                                                                                                                                                                                                                                                                                      to?: string;
                                                                                                                                                                                                                                                                                                                                                      };

                                                                                                                                                                                                                                                                                                                                                        type MergeResult

                                                                                                                                                                                                                                                                                                                                                        type MergeResult = PullResult & MergeDetail;

                                                                                                                                                                                                                                                                                                                                                          type MergeResultStatus

                                                                                                                                                                                                                                                                                                                                                          type MergeResultStatus = 'success' | string;

                                                                                                                                                                                                                                                                                                                                                            type MergeSummary

                                                                                                                                                                                                                                                                                                                                                            type MergeSummary = MergeResult;
                                                                                                                                                                                                                                                                                                                                                            • Deprecated

                                                                                                                                                                                                                                                                                                                                                              For consistent naming, please use MergeResult instead of MergeSummary

                                                                                                                                                                                                                                                                                                                                                            type MoveSummary

                                                                                                                                                                                                                                                                                                                                                            type MoveSummary = MoveResult;

                                                                                                                                                                                                                                                                                                                                                              type Options

                                                                                                                                                                                                                                                                                                                                                              type Options = Record<string, OptionsValues>;

                                                                                                                                                                                                                                                                                                                                                                type outputHandler

                                                                                                                                                                                                                                                                                                                                                                type outputHandler = (
                                                                                                                                                                                                                                                                                                                                                                command: string,
                                                                                                                                                                                                                                                                                                                                                                stdout: NodeJS.ReadableStream,
                                                                                                                                                                                                                                                                                                                                                                stderr: NodeJS.ReadableStream,
                                                                                                                                                                                                                                                                                                                                                                args: string[]
                                                                                                                                                                                                                                                                                                                                                                ) => void;
                                                                                                                                                                                                                                                                                                                                                                • A function called by the executor immediately after creating a child process. Allows the calling application to implement custom handling of the incoming stream of data from the git.

                                                                                                                                                                                                                                                                                                                                                                type ResetOptions

                                                                                                                                                                                                                                                                                                                                                                type ResetOptions = Options &
                                                                                                                                                                                                                                                                                                                                                                OptionFlags<'-q' | '--quiet' | '--no-quiet' | '--pathspec-from-nul'> &
                                                                                                                                                                                                                                                                                                                                                                OptionFlags<'--pathspec-from-file', string>;

                                                                                                                                                                                                                                                                                                                                                                  type Response

                                                                                                                                                                                                                                                                                                                                                                  type Response<T> = SimpleGit & Promise<T>;

                                                                                                                                                                                                                                                                                                                                                                    type SimpleGitTaskCallback

                                                                                                                                                                                                                                                                                                                                                                    type SimpleGitTaskCallback<T = string, E extends GitError = GitError> = (
                                                                                                                                                                                                                                                                                                                                                                    err: E | null,
                                                                                                                                                                                                                                                                                                                                                                    data: T
                                                                                                                                                                                                                                                                                                                                                                    ) => void;
                                                                                                                                                                                                                                                                                                                                                                    • The node-style callback to a task accepts either two arguments with the first as a null and the second as the data, or just one argument which is an error.

                                                                                                                                                                                                                                                                                                                                                                    type TaskOptions

                                                                                                                                                                                                                                                                                                                                                                    type TaskOptions<O extends Options = Options> = string[] | O;
                                                                                                                                                                                                                                                                                                                                                                    • Most tasks accept custom options as an array of strings as well as the options object. Unless the task is explicitly documented as such, the tasks will not accept both formats at the same time, preferring whichever appears last in the arguments.

                                                                                                                                                                                                                                                                                                                                                                    Package Files (18)

                                                                                                                                                                                                                                                                                                                                                                    Dependencies (3)

                                                                                                                                                                                                                                                                                                                                                                    Dev Dependencies (12)

                                                                                                                                                                                                                                                                                                                                                                    Peer Dependencies (0)

                                                                                                                                                                                                                                                                                                                                                                    No peer dependencies.

                                                                                                                                                                                                                                                                                                                                                                    Badge

                                                                                                                                                                                                                                                                                                                                                                    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                                                                                                                                                                                                                    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/simple-git.

                                                                                                                                                                                                                                                                                                                                                                    • Markdown
                                                                                                                                                                                                                                                                                                                                                                      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/simple-git)
                                                                                                                                                                                                                                                                                                                                                                    • HTML
                                                                                                                                                                                                                                                                                                                                                                      <a href="https://www.jsdocs.io/package/simple-git"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>