github.com/jfrog/frogbot@v1.1.1-0.20231221090046-821a26f50338/action/node_modules/simple-git/dist/typings/simple-git.d.ts (about)

     1  import * as resp from './response';
     2  import * as types from './types';
     3  import { GitError } from './errors';
     4  
     5  export interface SimpleGitFactory {
     6     (baseDir?: string, options?: Partial<types.SimpleGitOptions>): SimpleGit;
     7  
     8     (baseDir: string): SimpleGit;
     9  
    10     (options: Partial<types.SimpleGitOptions>): SimpleGit;
    11  }
    12  
    13  export type Response<T> = SimpleGit & Promise<T>;
    14  
    15  export interface SimpleGitBase {
    16     /**
    17      * Adds one or more files to source control
    18      */
    19     add(files: string | string[], callback?: types.SimpleGitTaskCallback<string>): Response<string>;
    20  
    21     /**
    22      * Sets the working directory of the subsequent commands.
    23      */
    24     cwd(
    25        directory: { path: string; root?: boolean },
    26        callback?: types.SimpleGitTaskCallback<string>
    27     ): Response<string>;
    28  
    29     cwd<path extends string>(
    30        directory: path,
    31        callback?: types.SimpleGitTaskCallback<path>
    32     ): Response<path>;
    33  
    34     /**
    35      * Compute object ID from a file
    36      */
    37     hashObject(path: string, callback?: types.SimpleGitTaskCallback): Response<string>;
    38  
    39     hashObject(
    40        path: string,
    41        write?: boolean,
    42        callback?: types.SimpleGitTaskCallback
    43     ): Response<string>;
    44  
    45     /**
    46      * Initialize a git repo
    47      */
    48     init(
    49        bare: boolean,
    50        options?: types.TaskOptions,
    51        callback?: types.SimpleGitTaskCallback<resp.InitResult>
    52     ): Response<resp.InitResult>;
    53  
    54     init(
    55        bare: boolean,
    56        callback?: types.SimpleGitTaskCallback<resp.InitResult>
    57     ): Response<resp.InitResult>;
    58  
    59     init(
    60        options?: types.TaskOptions,
    61        callback?: types.SimpleGitTaskCallback<resp.InitResult>
    62     ): Response<resp.InitResult>;
    63  
    64     init(callback?: types.SimpleGitTaskCallback<resp.InitResult>): Response<resp.InitResult>;
    65  
    66     /**
    67      * Runs a merge, `options` can be either an array of arguments
    68      * supported by the [`git merge`](https://git-scm.com/docs/git-merge)
    69      * or an options object.
    70      *
    71      * Conflicts during the merge result in an error response,
    72      * the response type whether it was an error or success will be a MergeSummary instance.
    73      * When successful, the MergeSummary has all detail from a the PullSummary
    74      *
    75      * @see https://github.com/steveukx/git-js/blob/master/src/responses/MergeSummary.js
    76      * @see https://github.com/steveukx/git-js/blob/master/src/responses/PullSummary.js
    77      */
    78     merge(
    79        options: types.TaskOptions,
    80        callback?: types.SimpleGitTaskCallback<resp.MergeResult>
    81     ): Response<resp.MergeResult>;
    82  
    83     /**
    84      * Merges from one branch to another, equivalent to running `git merge ${remote} ${branch}`, the `options` argument can
    85      * either be an array of additional parameters to pass to the command or null / omitted to be ignored.
    86      */
    87     mergeFromTo<E extends GitError>(
    88        remote: string,
    89        branch: string,
    90        options?: types.TaskOptions,
    91        callback?: types.SimpleGitTaskCallback<resp.MergeResult, E>
    92     ): Response<resp.MergeResult>;
    93  
    94     mergeFromTo<E extends GitError>(
    95        remote: string,
    96        branch: string,
    97        callback?: types.SimpleGitTaskCallback<resp.MergeResult, E>
    98     ): Response<resp.MergeResult>;
    99  
   100     /**
   101      * Sets a handler function to be called whenever a new child process is created, the handler function will be called
   102      * with the name of the command being run and the stdout & stderr streams used by the ChildProcess.
   103      *
   104      * @example
   105      * require('simple-git')
   106      *    .outputHandler(function (command, stdout, stderr) {
   107      *       stdout.pipe(process.stdout);
   108      *    })
   109      *    .checkout('https://github.com/user/repo.git');
   110      *
   111      * @see https://nodejs.org/api/child_process.html#child_process_class_childprocess
   112      * @see https://nodejs.org/api/stream.html#stream_class_stream_readable
   113      */
   114     outputHandler(handler: types.outputHandler | void): this;
   115  
   116     /**
   117      * Pushes the current committed changes to a remote, optionally specify the names of the remote and branch to use
   118      * when pushing. Supply multiple options as an array of strings in the first argument - see examples below.
   119      */
   120     push(
   121        remote?: string,
   122        branch?: string,
   123        options?: types.TaskOptions,
   124        callback?: types.SimpleGitTaskCallback<resp.PushResult>
   125     ): Response<resp.PushResult>;
   126  
   127     push(
   128        options?: types.TaskOptions,
   129        callback?: types.SimpleGitTaskCallback<resp.PushResult>
   130     ): Response<resp.PushResult>;
   131  
   132     push(callback?: types.SimpleGitTaskCallback<resp.PushResult>): Response<resp.PushResult>;
   133  
   134     /**
   135      * Stash the local repo
   136      */
   137     stash(
   138        options?: types.TaskOptions,
   139        callback?: types.SimpleGitTaskCallback<string>
   140     ): Response<string>;
   141  
   142     stash(callback?: types.SimpleGitTaskCallback<string>): Response<string>;
   143  
   144     /**
   145      * Show the working tree status.
   146      */
   147     status(
   148        options?: types.TaskOptions,
   149        callback?: types.SimpleGitTaskCallback<resp.StatusResult>
   150     ): Response<resp.StatusResult>;
   151  
   152     status(callback?: types.SimpleGitTaskCallback<resp.StatusResult>): Response<resp.StatusResult>;
   153  }
   154  
   155  export interface SimpleGit extends SimpleGitBase {
   156     /**
   157      * Add an annotated tag to the head of the current branch
   158      */
   159     addAnnotatedTag(
   160        tagName: string,
   161        tagMessage: string,
   162        callback?: types.SimpleGitTaskCallback<{ name: string }>
   163     ): Response<{ name: string }>;
   164  
   165     /**
   166      * Add config to local git instance for the specified `key` (eg: user.name) and value (eg: 'your name').
   167      * Set `append` to true to append to rather than overwrite the key
   168      */
   169     addConfig(
   170        key: string,
   171        value: string,
   172        append?: boolean,
   173        scope?: keyof typeof types.GitConfigScope,
   174        callback?: types.SimpleGitTaskCallback<string>
   175     ): Response<string>;
   176  
   177     addConfig(
   178        key: string,
   179        value: string,
   180        append?: boolean,
   181        callback?: types.SimpleGitTaskCallback<string>
   182     ): Response<string>;
   183  
   184     addConfig(
   185        key: string,
   186        value: string,
   187        callback?: types.SimpleGitTaskCallback<string>
   188     ): Response<string>;
   189  
   190     /**
   191      * Applies a patch to the repo
   192      */
   193     applyPatch(
   194        patches: string | string[],
   195        options: types.TaskOptions<types.ApplyOptions>,
   196        callback?: types.SimpleGitTaskCallback<string>
   197     ): Response<string>;
   198  
   199     applyPatch(
   200        patches: string | string[],
   201        callback?: types.SimpleGitTaskCallback<string>
   202     ): Response<string>;
   203  
   204     /**
   205      * Configuration values visible to git in the current working directory
   206      */
   207     listConfig(
   208        scope: keyof typeof types.GitConfigScope,
   209        callback?: types.SimpleGitTaskCallback<resp.ConfigListSummary>
   210     ): Response<resp.ConfigListSummary>;
   211  
   212     listConfig(
   213        callback?: types.SimpleGitTaskCallback<resp.ConfigListSummary>
   214     ): Response<resp.ConfigListSummary>;
   215  
   216     /**
   217      * Adds a remote to the list of remotes.
   218      *
   219      * - `remoteName` Name of the repository - eg "upstream"
   220      * - `remoteRepo` Fully qualified SSH or HTTP(S) path to the remote repo
   221      * - `options` Optional additional settings permitted by the `git remote add` command, merged into the command prior to the repo name and remote url
   222      */
   223     addRemote(
   224        remoteName: string,
   225        remoteRepo: string,
   226        options?: types.TaskOptions,
   227        callback?: types.SimpleGitTaskCallback<string>
   228     ): Response<string>;
   229  
   230     addRemote(
   231        remoteName: string,
   232        remoteRepo: string,
   233        callback?: types.SimpleGitTaskCallback<string>
   234     ): Response<string>;
   235  
   236     /**
   237      * Add a lightweight tag to the head of the current branch
   238      */
   239     addTag(
   240        name: string,
   241        callback?: types.SimpleGitTaskCallback<{ name: string }>
   242     ): Response<{ name: string }>;
   243  
   244     /**
   245      * Equivalent to `catFile` but will return the native `Buffer` of content from the git command's stdout.
   246      */
   247     binaryCatFile(options: string[], callback?: types.SimpleGitTaskCallback<any>): Response<any>;
   248  
   249     /**
   250      * List all branches
   251      */
   252     branch(
   253        options?: types.TaskOptions,
   254        callback?: types.SimpleGitTaskCallback<resp.BranchSummary>
   255     ): Response<resp.BranchSummary>;
   256  
   257     /**
   258      * List of local branches
   259      */
   260     branchLocal(
   261        callback?: types.SimpleGitTaskCallback<resp.BranchSummary>
   262     ): Response<resp.BranchSummary>;
   263  
   264     /**
   265      * Returns a list of objects in a tree based on commit hash.
   266      * Passing in an object hash returns the object's content, size, and type.
   267      *
   268      * Passing "-p" will instruct cat-file to determine the object type, and display its formatted contents.
   269      *
   270      * @see https://git-scm.com/docs/git-cat-file
   271      */
   272     catFile(options: string[], callback?: types.SimpleGitTaskCallback<string>): Response<string>;
   273  
   274     catFile(callback?: types.SimpleGitTaskCallback<string>): Response<string>;
   275  
   276     /**
   277      * Check if a pathname or pathnames are excluded by .gitignore
   278      *
   279      */
   280     checkIgnore(
   281        pathNames: string[],
   282        callback?: types.SimpleGitTaskCallback<string[]>
   283     ): Response<string[]>;
   284  
   285     checkIgnore(path: string, callback?: types.SimpleGitTaskCallback<string[]>): Response<string[]>;
   286  
   287     /**
   288      * Validates that the current working directory is a valid git repo file path.
   289      *
   290      * To make a more specific assertion of the repo, add the `action` argument:
   291      *
   292      * - `bare` to validate that the working directory is inside a bare repo.
   293      * - `root` to validate that the working directory is the root of a repo.
   294      * - `tree` (default value when omitted) to simply validate that the working
   295      *    directory is the descendent of a repo
   296      */
   297     checkIsRepo(
   298        action?: types.CheckRepoActions,
   299        callback?: types.SimpleGitTaskCallback<boolean>
   300     ): Response<boolean>;
   301  
   302     checkIsRepo(callback?: types.SimpleGitTaskCallback<boolean>): Response<boolean>;
   303  
   304     /**
   305      * Checkout a tag or revision, any number of additional arguments can be passed to the `git checkout` command
   306      * by supplying either a string or array of strings as the `what` parameter.
   307      */
   308     checkout(
   309        what: string,
   310        options?: types.TaskOptions,
   311        callback?: types.SimpleGitTaskCallback<string>
   312     ): Response<string>;
   313  
   314     checkout(what: string, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
   315  
   316     checkout(
   317        options?: types.TaskOptions,
   318        callback?: types.SimpleGitTaskCallback<string>
   319     ): Response<string>;
   320  
   321     /**
   322      * Checkout a remote branch - equivalent to `git checkout -b ${branchName} ${startPoint}`
   323      *
   324      * - branchName name of branch.
   325      * - startPoint (e.g origin/development).
   326      */
   327     checkoutBranch(
   328        branchName: string,
   329        startPoint: string,
   330        callback?: types.SimpleGitTaskCallback<void>
   331     ): Response<void>;
   332  
   333     checkoutBranch(
   334        branchName: string,
   335        startPoint: string,
   336        options?: types.TaskOptions,
   337        callback?: types.SimpleGitTaskCallback<void>
   338     ): Response<void>;
   339  
   340     /**
   341      * Internally uses pull and tags to get the list of tags then checks out the latest tag.
   342      */
   343     checkoutLatestTag(
   344        branchName: string,
   345        startPoint: string,
   346        callback?: types.SimpleGitTaskCallback<void>
   347     ): Response<void>;
   348  
   349     /**
   350      * Checkout a local branch - equivalent to `git checkout -b ${branchName}`
   351      */
   352     checkoutLocalBranch(
   353        branchName: string,
   354        callback?: types.SimpleGitTaskCallback<void>
   355     ): Response<void>;
   356  
   357     checkoutLocalBranch(
   358        branchName: string,
   359        options?: types.TaskOptions,
   360        callback?: types.SimpleGitTaskCallback<void>
   361     ): Response<void>;
   362  
   363     /**
   364      * Deletes unwanted content from the local repo - when supplying the first argument as
   365      * an array of `CleanOptions`, the array must include one of `CleanOptions.FORCE` or
   366      * `CleanOptions.DRY_RUN`.
   367      *
   368      * eg:
   369      *
   370      * ```typescript
   371      await git.clean(CleanOptions.FORCE);
   372      await git.clean(CleanOptions.DRY_RUN + CleanOptions.RECURSIVE);
   373      await git.clean(CleanOptions.FORCE, ['./path']);
   374      await git.clean(CleanOptions.IGNORED + CleanOptions.FORCE, {'./path': null});
   375      * ```
   376      */
   377     clean(
   378        args: types.CleanOptions[],
   379        options?: types.TaskOptions,
   380        callback?: types.SimpleGitTaskCallback<resp.CleanSummary>
   381     ): Response<resp.CleanSummary>;
   382  
   383     clean(
   384        mode: types.CleanMode | string,
   385        options?: types.TaskOptions,
   386        callback?: types.SimpleGitTaskCallback<resp.CleanSummary>
   387     ): Response<resp.CleanSummary>;
   388  
   389     clean(
   390        mode: types.CleanMode | string,
   391        callback?: types.SimpleGitTaskCallback<resp.CleanSummary>
   392     ): Response<resp.CleanSummary>;
   393  
   394     clean(options?: types.TaskOptions): Response<resp.CleanSummary>;
   395  
   396     clean(callback?: types.SimpleGitTaskCallback<resp.CleanSummary>): Response<resp.CleanSummary>;
   397  
   398     /**
   399      * Clears the queue of pending commands and returns the wrapper instance for chaining.
   400      */
   401     clearQueue(): this;
   402  
   403     /**
   404      * Clone a repository into a new directory.
   405      *
   406      * - repoPath repository url to clone e.g. https://github.com/steveukx/git-js.git
   407      * -  localPath local folder path to clone to.
   408      * - options supported by [git](https://git-scm.com/docs/git-clone).
   409      */
   410     clone(
   411        repoPath: string,
   412        localPath: string,
   413        options?: types.TaskOptions,
   414        callback?: types.SimpleGitTaskCallback<string>
   415     ): Response<string>;
   416  
   417     clone(
   418        repoPath: string,
   419        options?: types.TaskOptions,
   420        callback?: types.SimpleGitTaskCallback<string>
   421     ): Response<string>;
   422  
   423     /**
   424      * Commits changes in the current working directory - when specific file paths are supplied, only changes on those
   425      * files will be committed.
   426      */
   427     commit(
   428        message: string | string[],
   429        files?: string | string[],
   430        options?: types.Options,
   431        callback?: types.SimpleGitTaskCallback<resp.CommitResult>
   432     ): Response<resp.CommitResult>;
   433  
   434     commit(
   435        message: string | string[],
   436        options?: types.TaskOptions,
   437        callback?: types.SimpleGitTaskCallback<resp.CommitResult>
   438     ): Response<resp.CommitResult>;
   439  
   440     commit(
   441        message: string | string[],
   442        files?: string | string[],
   443        callback?: types.SimpleGitTaskCallback<resp.CommitResult>
   444     ): Response<resp.CommitResult>;
   445  
   446     commit(
   447        message: string | string[],
   448        callback?: types.SimpleGitTaskCallback<resp.CommitResult>
   449     ): Response<resp.CommitResult>;
   450  
   451     /**
   452      * Sets the path to a custom git binary, should either be `git` when there is an installation of git available on
   453      * the system path, or a fully qualified path to the executable.
   454      */
   455     customBinary(command: string): this;
   456  
   457     /**
   458      * Delete one local branch. Supply the branchName as a string to return a
   459      * single `BranchDeletionSummary` instances.
   460      *
   461      * - branchName name of branch
   462      * - forceDelete (optional, defaults to false) set to true to forcibly delete unmerged branches
   463      */
   464     deleteLocalBranch(
   465        branchName: string,
   466        forceDelete?: boolean,
   467        callback?: types.SimpleGitTaskCallback<resp.BranchSingleDeleteResult>
   468     ): Response<resp.BranchSingleDeleteResult>;
   469  
   470     deleteLocalBranch(
   471        branchName: string,
   472        callback?: types.SimpleGitTaskCallback<resp.BranchSingleDeleteResult>
   473     ): Response<resp.BranchSingleDeleteResult>;
   474  
   475     /**
   476      * Delete one or more local branches. Supply the branchName as a string to return a
   477      * single `BranchDeletionSummary` or as an array of branch names to return an array of
   478      * `BranchDeletionSummary` instances.
   479      *
   480      * - branchNames name of branch or array of branch names
   481      * - forceDelete (optional, defaults to false) set to true to forcibly delete unmerged branches
   482      */
   483     deleteLocalBranches(
   484        branchNames: string[],
   485        forceDelete?: boolean,
   486        callback?: types.SimpleGitTaskCallback<resp.BranchMultiDeleteResult>
   487     ): Response<resp.BranchMultiDeleteResult>;
   488  
   489     /**
   490      * Get the diff of the current repo compared to the last commit with a set of options supplied as a string.
   491      */
   492     diff(
   493        options?: types.TaskOptions,
   494        callback?: types.SimpleGitTaskCallback<string>
   495     ): Response<string>;
   496  
   497     /**
   498      * Gets a summary of the diff for files in the repo, uses the `git diff --stat` format to calculate changes.
   499      *
   500      * in order to get staged (only): `--cached` or `--staged`.
   501      */
   502     diffSummary(
   503        command: string | number,
   504        options: types.TaskOptions,
   505        callback?: types.SimpleGitTaskCallback<resp.DiffResult>
   506     ): Response<resp.DiffResult>;
   507  
   508     diffSummary(
   509        command: string | number,
   510        callback?: types.SimpleGitTaskCallback<resp.DiffResult>
   511     ): Response<resp.DiffResult>;
   512  
   513     diffSummary(
   514        options: types.TaskOptions,
   515        callback?: types.SimpleGitTaskCallback<resp.DiffResult>
   516     ): Response<resp.DiffResult>;
   517  
   518     diffSummary(callback?: types.SimpleGitTaskCallback<resp.DiffResult>): Response<resp.DiffResult>;
   519  
   520     /**
   521      * Sets an environment variable for the spawned child process, either supply both a name and value as strings or
   522      * a single object to entirely replace the current environment variables.
   523      *
   524      * @param {string|Object} name
   525      * @param {string} [value]
   526      */
   527     env(name: string, value: string): this;
   528  
   529     env(env: object): this;
   530  
   531     /**
   532      * Calls the supplied `handle` function at the next step in the chain, used to run arbitrary functions synchronously
   533      * before the next task in the git api.
   534      */
   535     exec(handle: () => void): Response<void>;
   536  
   537     /**
   538      * Updates the local working copy database with changes from the default remote repo and branch.
   539      */
   540     fetch(
   541        remote: string,
   542        branch: string,
   543        options?: types.TaskOptions,
   544        callback?: types.SimpleGitTaskCallback<resp.FetchResult>
   545     ): Response<resp.FetchResult>;
   546  
   547     fetch(
   548        remote: string,
   549        branch: string,
   550        callback?: types.SimpleGitTaskCallback<resp.FetchResult>
   551     ): Response<resp.FetchResult>;
   552  
   553     fetch(
   554        remote: string,
   555        options?: types.TaskOptions,
   556        callback?: types.SimpleGitTaskCallback<resp.FetchResult>
   557     ): Response<resp.FetchResult>;
   558  
   559     fetch(
   560        options?: types.TaskOptions,
   561        callback?: types.SimpleGitTaskCallback<resp.FetchResult>
   562     ): Response<resp.FetchResult>;
   563  
   564     fetch(callback?: types.SimpleGitTaskCallback<resp.FetchResult>): Response<resp.FetchResult>;
   565  
   566     /**
   567      * Gets the current value of a configuration property by it key, optionally specify the scope in which
   568      * to run the command (omit / set to `undefined` to check in the complete overlaid configuration visible
   569      * to the `git` process).
   570      */
   571     getConfig(
   572        key: string,
   573        scope?: keyof typeof types.GitConfigScope,
   574        callback?: types.SimpleGitTaskCallback<string>
   575     ): Response<resp.ConfigGetResult>;
   576  
   577     /**
   578      * Gets the currently available remotes, setting the optional verbose argument to true includes additional
   579      * detail on the remotes themselves.
   580      */
   581     getRemotes(
   582        callback?: types.SimpleGitTaskCallback<types.RemoteWithoutRefs[]>
   583     ): Response<types.RemoteWithoutRefs[]>;
   584  
   585     getRemotes(
   586        verbose?: false,
   587        callback?: types.SimpleGitTaskCallback<types.RemoteWithoutRefs[]>
   588     ): Response<types.RemoteWithoutRefs[]>;
   589  
   590     getRemotes(
   591        verbose: true,
   592        callback?: types.SimpleGitTaskCallback<types.RemoteWithRefs[]>
   593     ): Response<types.RemoteWithRefs[]>;
   594  
   595     /**
   596      * Search for files matching the supplied search terms
   597      */
   598     grep(
   599        searchTerm: string | types.GitGrepQuery,
   600        callback?: types.SimpleGitTaskCallback<resp.GrepResult>
   601     ): Response<resp.GrepResult>;
   602  
   603     grep(
   604        searchTerm: string | types.GitGrepQuery,
   605        options?: types.TaskOptions,
   606        callback?: types.SimpleGitTaskCallback<resp.GrepResult>
   607     ): Response<resp.GrepResult>;
   608  
   609     /**
   610      * List remotes by running the `ls-remote` command with any number of arbitrary options
   611      * in either array of object form.
   612      */
   613     listRemote(
   614        args?: types.TaskOptions,
   615        callback?: types.SimpleGitTaskCallback<string>
   616     ): Response<string>;
   617  
   618     /**
   619      * Show commit logs from `HEAD` to the first commit.
   620      * If provided between `options.from` and `options.to` tags or branch.
   621      *
   622      * You can provide `options.file`, which is the path to a file in your repository. Then only this file will be considered.
   623      *
   624      * To use a custom splitter in the log format, set `options.splitter` to be the string the log should be split on.
   625      *
   626      * By default the following fields will be part of the result:
   627      *   `hash`: full commit hash
   628      *   `date`: author date, ISO 8601-like format
   629      *   `message`: subject + ref names, like the --decorate option of git-log
   630      *   `author_name`: author name
   631      *   `author_email`: author mail
   632      * You can specify `options.format` to be an mapping from key to a format option like `%H` (for commit hash).
   633      * The fields specified in `options.format` will be the fields in the result.
   634      *
   635      * Options can also be supplied as a standard options object for adding custom properties supported by the git log command.
   636      * For any other set of options, supply options as an array of strings to be appended to the git log command.
   637      *
   638      * @returns Response<ListLogSummary>
   639      *
   640      * @see https://git-scm.com/docs/git-log
   641      */
   642     log<T = types.DefaultLogFields>(
   643        options?: types.TaskOptions | types.LogOptions<T>,
   644        callback?: types.SimpleGitTaskCallback<resp.LogResult<T>>
   645     ): Response<resp.LogResult<T>>;
   646  
   647     /**
   648      * Mirror a git repo
   649      *
   650      * Equivalent to `git.clone(repoPath, localPath, ['--mirror'])`, `clone` allows
   651      * for additional task options.
   652      */
   653     mirror(
   654        repoPath: string,
   655        localPath: string,
   656        callback?: types.SimpleGitTaskCallback<string>
   657     ): Response<string>;
   658  
   659     /**
   660      * Moves one or more files to a new destination.
   661      *
   662      * @see https://git-scm.com/docs/git-mv
   663      */
   664     mv(
   665        from: string | string[],
   666        to: string,
   667        callback?: types.SimpleGitTaskCallback<resp.MoveSummary>
   668     ): Response<resp.MoveSummary>;
   669  
   670     /**
   671      * Fetch from and integrate with another repository or a local branch. In the case that the `git pull` fails with a
   672      * recognised fatal error, the exception thrown by this function will be a `GitResponseError<PullFailedResult>`.
   673      */
   674     pull(
   675        remote?: string,
   676        branch?: string,
   677        options?: types.TaskOptions,
   678        callback?: types.SimpleGitTaskCallback<resp.PullResult>
   679     ): Response<resp.PullResult>;
   680  
   681     pull(
   682        options?: types.TaskOptions,
   683        callback?: types.SimpleGitTaskCallback<resp.PullResult>
   684     ): Response<resp.PullResult>;
   685  
   686     pull(callback?: types.SimpleGitTaskCallback<resp.PullResult>): Response<resp.PullResult>;
   687  
   688     /**
   689      * Pushes the current tag changes to a remote which can be either a URL or named remote. When not specified uses the
   690      * default configured remote spec.
   691      */
   692     pushTags(
   693        remote: string,
   694        options?: types.TaskOptions,
   695        callback?: types.SimpleGitTaskCallback<resp.PushResult>
   696     ): Response<resp.PushResult>;
   697  
   698     pushTags(
   699        options?: types.TaskOptions,
   700        callback?: types.SimpleGitTaskCallback<resp.PushResult>
   701     ): Response<resp.PushResult>;
   702  
   703     pushTags(callback?: types.SimpleGitTaskCallback<resp.PushResult>): Response<resp.PushResult>;
   704  
   705     /**
   706      * Executes any command against the git binary.
   707      */
   708     raw(
   709        commands: string | string[] | types.TaskOptions,
   710        callback?: types.SimpleGitTaskCallback<string>
   711     ): Response<string>;
   712  
   713     raw(
   714        options: types.TaskOptions,
   715        callback?: types.SimpleGitTaskCallback<string>
   716     ): Response<string>;
   717  
   718     raw(...commands: string[]): Response<string>;
   719  
   720     // leading varargs with trailing options/callback
   721     raw(
   722        a: string,
   723        options: types.TaskOptions,
   724        callback?: types.SimpleGitTaskCallback<string>
   725     ): Response<string>;
   726  
   727     raw(
   728        a: string,
   729        b: string,
   730        options: types.TaskOptions,
   731        callback?: types.SimpleGitTaskCallback<string>
   732     ): Response<string>;
   733  
   734     raw(
   735        a: string,
   736        b: string,
   737        c: string,
   738        options: types.TaskOptions,
   739        callback?: types.SimpleGitTaskCallback<string>
   740     ): Response<string>;
   741  
   742     raw(
   743        a: string,
   744        b: string,
   745        c: string,
   746        d: string,
   747        options: types.TaskOptions,
   748        callback?: types.SimpleGitTaskCallback<string>
   749     ): Response<string>;
   750  
   751     raw(
   752        a: string,
   753        b: string,
   754        c: string,
   755        d: string,
   756        e: string,
   757        options: types.TaskOptions,
   758        callback?: types.SimpleGitTaskCallback<string>
   759     ): Response<string>;
   760  
   761     // leading varargs with trailing callback
   762     raw(a: string, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
   763  
   764     raw(a: string, b: string, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
   765  
   766     raw(
   767        a: string,
   768        b: string,
   769        c: string,
   770        callback?: types.SimpleGitTaskCallback<string>
   771     ): Response<string>;
   772  
   773     raw(
   774        a: string,
   775        b: string,
   776        c: string,
   777        d: string,
   778        callback?: types.SimpleGitTaskCallback<string>
   779     ): Response<string>;
   780  
   781     raw(
   782        a: string,
   783        b: string,
   784        c: string,
   785        d: string,
   786        e: string,
   787        callback?: types.SimpleGitTaskCallback<string>
   788     ): Response<string>;
   789  
   790     /**
   791      * Rebases the current working copy. Options can be supplied either as an array of string parameters
   792      * to be sent to the `git rebase` command, or a standard options object.
   793      */
   794     rebase(
   795        options?: types.TaskOptions,
   796        callback?: types.SimpleGitTaskCallback<string>
   797     ): Response<string>;
   798  
   799     rebase(callback?: types.SimpleGitTaskCallback<string>): Response<string>;
   800  
   801     /**
   802      * Call any `git remote` function with arguments passed as an array of strings.
   803      */
   804     remote(
   805        options: string[],
   806        callback?: types.SimpleGitTaskCallback<void | string>
   807     ): Response<void | string>;
   808  
   809     /**
   810      * Removes an entry from the list of remotes.
   811      *
   812      * - remoteName Name of the repository - eg "upstream"
   813      */
   814     removeRemote(remoteName: string, callback?: types.SimpleGitTaskCallback<void>): Response<void>;
   815  
   816     /**
   817      * Reset a repo. Called without arguments this is a soft reset for the whole repo,
   818      * for explicitly setting the reset mode, supply the first argument as one of the
   819      * supported reset modes.
   820      *
   821      * Trailing options argument can be either a string array, or an extension of the
   822      * ResetOptions, use this argument for supplying arbitrary additional arguments,
   823      * such as restricting the pathspec.
   824      *
   825      * ```typescript
   826      // equivalent to each other
   827      simpleGit().reset(ResetMode.HARD, ['--', 'my-file.txt']);
   828      simpleGit().reset(['--hard', '--', 'my-file.txt']);
   829      simpleGit().reset(ResetMode.HARD, {'--': null, 'my-file.txt': null});
   830      simpleGit().reset({'--hard': null, '--': null, 'my-file.txt': null});
   831      ```
   832      */
   833     reset(
   834        mode: types.ResetMode,
   835        options?: types.TaskOptions<types.ResetOptions>,
   836        callback?: types.SimpleGitTaskCallback<string>
   837     ): Response<string>;
   838  
   839     reset(mode: types.ResetMode, callback?: types.SimpleGitTaskCallback<string>): Response<string>;
   840  
   841     reset(
   842        options?: types.TaskOptions<types.ResetOptions>,
   843        callback?: types.SimpleGitTaskCallback<string>
   844     ): Response<string>;
   845  
   846     /**
   847      * Revert one or more commits in the local working copy
   848      *
   849      * - commit The commit to revert. Can be any hash, offset (eg: `HEAD~2`) or range (eg: `master~5..master~2`)
   850      */
   851     revert(
   852        commit: String,
   853        options?: types.TaskOptions,
   854        callback?: types.SimpleGitTaskCallback<void>
   855     ): Response<void>;
   856  
   857     revert(commit: String, callback?: types.SimpleGitTaskCallback<void>): Response<void>;
   858  
   859     /**
   860      * Passes the supplied options to `git rev-parse` and returns the string response. Options can be either a
   861      * string array or `Options` object of options compatible with the [rev-parse](https://git-scm.com/docs/git-rev-parse)
   862      *
   863      * Example uses of `rev-parse` include converting friendly commit references (ie: branch names) to SHA1 hashes
   864      * and retrieving meta details about the current repo (eg: the root directory, and whether it was created as
   865      * a bare repo).
   866      */
   867     revparse(
   868        option: string,
   869        options?: types.TaskOptions,
   870        callback?: types.SimpleGitTaskCallback<string>
   871     ): Response<string>;
   872  
   873     revparse(
   874        options?: types.TaskOptions,
   875        callback?: types.SimpleGitTaskCallback<string>
   876     ): Response<string>;
   877  
   878     /**
   879      * Removes the named files from source control.
   880      */
   881     rm(paths: string | string[], callback?: types.SimpleGitTaskCallback<void>): Response<void>;
   882  
   883     /**
   884      * Removes the named files from source control but keeps them on disk rather than deleting them entirely. To
   885      * completely remove the files, use `rm`.
   886      */
   887     rmKeepLocal(
   888        paths: string | string[],
   889        callback?: types.SimpleGitTaskCallback<void>
   890     ): Response<void>;
   891  
   892     /**
   893      * Show various types of objects, for example the file at a certain commit
   894      */
   895     show(
   896        option: string | types.TaskOptions,
   897        callback?: types.SimpleGitTaskCallback<string>
   898     ): Response<string>;
   899  
   900     show(callback?: types.SimpleGitTaskCallback<string>): Response<string>;
   901  
   902     showBuffer(option: string | types.TaskOptions): Response<Buffer>;
   903  
   904     /**
   905      * @deprecated
   906      *
   907      * From version 2.7.0, use of `silent` is deprecated in favour of using the `debug` library, this method will
   908      * be removed in version 3.x.
   909      *
   910      * Please see the [readme](https://github.com/steveukx/git-js/blob/master/readme.md#enable-logging) for more details.
   911      *
   912      * Disables/enables the use of the console for printing warnings and errors, by default messages are not shown in
   913      * a production environment.
   914      *
   915      * @param {boolean} silence
   916      */
   917     silent(silence?: boolean): this;
   918  
   919     /**
   920      * List the stash(s) of the local repo
   921      */
   922     stashList(
   923        options?: types.TaskOptions,
   924        callback?: types.SimpleGitTaskCallback<resp.LogResult>
   925     ): Response<resp.LogResult>;
   926  
   927     stashList(callback?: types.SimpleGitTaskCallback<resp.LogResult>): Response<resp.LogResult>;
   928  
   929     /**
   930      * Call any `git submodule` function with arguments passed as an array of strings.
   931      */
   932     subModule(
   933        options?: types.TaskOptions,
   934        callback?: types.SimpleGitTaskCallback<string>
   935     ): Response<string>;
   936  
   937     /**
   938      * Add a submodule
   939      */
   940     submoduleAdd(
   941        repo: string,
   942        path: string,
   943        callback?: types.SimpleGitTaskCallback<string>
   944     ): Response<string>;
   945  
   946     /**
   947      * Initialise submodules
   948      */
   949     submoduleInit(
   950        moduleName: string,
   951        options?: types.TaskOptions,
   952        callback?: types.SimpleGitTaskCallback<string>
   953     ): Response<string>;
   954  
   955     submoduleInit(
   956        moduleName: string,
   957        callback?: types.SimpleGitTaskCallback<string>
   958     ): Response<string>;
   959  
   960     submoduleInit(
   961        options?: types.TaskOptions,
   962        callback?: types.SimpleGitTaskCallback<string>
   963     ): Response<string>;
   964  
   965     submoduleInit(callback?: types.SimpleGitTaskCallback<string>): Response<string>;
   966  
   967     /**
   968      * Update submodules
   969      */
   970     submoduleUpdate(
   971        moduleName: string,
   972        options?: types.TaskOptions,
   973        callback?: types.SimpleGitTaskCallback<string>
   974     ): Response<string>;
   975  
   976     submoduleUpdate(
   977        moduleName: string,
   978        callback?: types.SimpleGitTaskCallback<string>
   979     ): Response<string>;
   980  
   981     submoduleUpdate(
   982        options?: types.TaskOptions,
   983        callback?: types.SimpleGitTaskCallback<string>
   984     ): Response<string>;
   985  
   986     submoduleUpdate(callback?: types.SimpleGitTaskCallback<string>): Response<string>;
   987  
   988     /**
   989      * List all tags. When using git 2.7.0 or above, include an options object with `"--sort": "property-name"` to
   990      * sort the tags by that property instead of using the default semantic versioning sort.
   991      *
   992      * Note, supplying this option when it is not supported by your Git version will cause the operation to fail.
   993      */
   994     tag(
   995        options?: types.TaskOptions,
   996        callback?: types.SimpleGitTaskCallback<string>
   997     ): Response<string>;
   998  
   999     /**
  1000      * Gets a list of tagged versions.
  1001      */
  1002     tags(
  1003        options?: types.TaskOptions,
  1004        callback?: types.SimpleGitTaskCallback<resp.TagResult>
  1005     ): Response<resp.TagResult>;
  1006  
  1007     tags(callback?: types.SimpleGitTaskCallback<resp.TagResult>): Response<resp.TagResult>;
  1008  
  1009     /**
  1010      * Updates repository server info
  1011      */
  1012     updateServerInfo(callback?: types.SimpleGitTaskCallback<string>): Response<string>;
  1013  
  1014     /**
  1015      * Retrieves `git` version information, including whether `git` is installed on the `PATH`
  1016      */
  1017     version(
  1018        callback?: types.SimpleGitTaskCallback<types.VersionResult>
  1019     ): Response<types.VersionResult>;
  1020  }