Packages

simple-git

4.1.0 · 16 Nov 2026MIT15.5M / weekRepositorynpmAtom feed

Your version

278 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 4.x · latest line
  2. 4.1.0

    16 Nov 2026

    Summary· from the note as AI read it

    Upgrade: this release fixes a security issue.

  3. 4.0.2

    26 Sep 2026
    • Add VISUAL environment variable to set of allowUnsafeEditor environment variables.

  4. 4.0.1

    25 Sep 2026
    • Prepare package.json before publishing.

  5. 4.0.0

    25 Sep 2026
    • Breaking

      Major upgrade to v4. In this version:

      // v3 - previously supported imports
      import simpleGit from "simple-git";
      import { gitP } from "simple-git";
      import simpleGit from "simple-git/promise";
      const simpleGit = require("simple-git");
      
      // v4 - consolidates to a single supported import
      import { simpleGit } from "simple-git";
      const { simpleGit } = require("simple-git");
      // v3 - allowed the use of unambiguous long-form options
      git.raw("clone", "--conf=user.name=me", "...");
      
      // v4 - requires full option names, abbreviated option names will now throw a GitConfigurationError
      git.raw("fetch", "--config=user.name=me", "...");
      // v3
      process.env.FOO = "bar";
      process.env.GIT_TEMPLATE_DIR = "./some/path";
      simpleGit().raw("clone"); // git child process can see both environment variables
      
      // v4
      process.env.FOO = "bar";
      process.env.GIT_TEMPLATE_DIR = "./some/path";
      simpleGit().raw("clone"); // git child process now sees only FOO
      
      simpleGit({
        // explicitly allow the named environment variable so it can pass through.
        allowEnvoronment: ["GIT_TEMPLATE_DIR"],
        // and enable the use of an unsafe behaviour
        unsafe: { allowUnsafeTemplateDir: true },
      });
      // v3 used a single opt-in to potential unsafe actiity
      simpleGit({ unsafe: { allowUnsafeTemplateDir: true } })
        .env({ GIT_TEMPLATE_DIR: "./foo" })
        .init();
      
      // v4 uses a double opt-in, allow the behaviour and the mechanism
      simpleGit({
        allowEnvoronment: ["GIT_TEMPLATE_DIR"],
        unsafe: { allowUnsafeTemplateDir: true },
      })
        .env({ GIT_TEMPLATE_DIR: "./foo" })
        .init();
    • Support one-shot stdin via git.input(data) (string or Buffer).

    • Add allowUnsafeExec detection to rebase -x and rebase --exec.

  6. 3.x
  7. 3.36.0

    12 Apr 2026
    • Extend known exploitable configuration keys and per-task environment variables.

      Note - ParsedVulnerabilities from argv-parser is removed in favour of a readonly array of Vulnerability to match usage in simple-git, rolled into the new vulnerabilityCheck for simpler access to the identified issues.

    • Remove conflicting node:buffer import

  8. 3.35.2

    6 Apr 2026
    • Improvements for mono-repo publishing pipeline

  9. 3.35.1

    6 Apr 2026
    • Update monorepo version handling during publish

  10. 3.35.0

    6 Apr 2026
    • Updating publish config

  11. 3.34.0

    6 Apr 2026
    • Revised dependency tree to add helper modules as dependencies in main simple-git

    • Enhances scanning of arguments before passing on to the spawned child_process.

      Caters for -c flags prefixing the git task (used when setting global inline config) and suffixing with either -c, --config or --config-env. Detects git config operations that write to the configuration.

  12. 3.33.0

    10 Mar 2026
    • Use pathspec wrappers for remote and local paths when running either git.clone or git.mirror to
      avoid leaving them less open for unexpected outcomes when passing unsanitised data into these tasks.

    • Enhanced git -c checks in unsafe plugin.

  13. 3.32.3

    26 Feb 2026
    • Enhanced protocol.allow checks in allowUnsafeExtProtocol handling.

  14. 3.32.2

    22 Feb 2026
    • Enhanced clone unsafe switch detection.

  15. 3.32.1

    21 Feb 2026
    • Fix regex for detecting unsafe clone options

  16. 3.32.0

    21 Feb 2026
    • Enhances the unsafe plugin to block additional cases where the -u switch may be disguised
      along with other single character options.

    • Use task runner for logging use of deprecated (already no-op) functions.

  17. 3.31.1

    14 Feb 2026
    • Resolve NPM publish steps

  18. 3.30.0

    2 Nov 2025
    • Correctly identify current branch name when using git.status in a cloned empty repo.

      Previously git.status would report the current branch name as No. Thank you to @MaddyGuthridge for identifying this issue.

  19. 3.29.0

    30 Oct 2025
    • Support for absolute paths on Windows when using git.checkIngore, previously Windows would report paths with duplicate separators \\\\ between directories.

      Following this change all paths returned from git.checkIgnore will be normalized through node:path, this should have no impact on non-windows users where the git binary doesn't wrap absolute paths with quotes.

    • Support the use of git.branch(['--show-current']) to limit the branch list to only the current branch.

    • Change to biome for lint and format

  20. 3.28.0

    6 Jun 2025
    • Allow repeating git options like {'--opt': ['value1', 'value2']}

  21. 3.27.0

    19 Sep 2024
    • Add similarity to the DiffResultNameStatusFile interface used when fetching log/diff with the --name-status option.

    • Diff summary includes original name of renamed files when run wiht the --name-status option.

    • Fixes an issue with reporting name changes in the files array returned by git.status.

  22. 3.26.0

    1 Sep 2024
    • Upgrade build tools and typescript

  23. 3.25.0

    10 Jun 2024
    • Add support for parsing count-objects

    • Upgrade dependencies and build tools

  24. 3.24.0

    28 Mar 2024
    • Enable the use of a two part custom binary

  25. 3.23.0

    17 Mar 2024
    • Bump package manager from yarn v1 to v4

    • Fixed a performance issue when parsing stat diff summaries

    • Update build tools and workflows for Yarn 4 compatibility

  26. 3.22.0

    29 Dec 2023
    • Add status to DiffResult when using --name-status

  27. 3.21.0

    20 Nov 2023
    • Add firstCommit utility interface

  28. 3.20.0

    23 Sep 2023
    • Use pathspec in git.log to allow use of previously deleted files in file argument

  29. 3.19.1

    26 Jun 2023
    • Keep path splitter without path specs

  30. 3.19.0

    24 May 2023
    • Create a utility to append pathspec / file lists to tasks through the TaskOptions array/object

  31. 3.18.0

    25 Apr 2023
    • Add new interface for showBuffer to allow using git show on binary files.

    • Examples and documentation for outputHandler

  32. 3.17.0

    4 Mar 2023
    • Timeout plugin can now be configured to ignore data on either stdOut or stdErr in the git process when determining whether to kill the spawned process.

  33. 3.16.1

    15 Feb 2023
    • Fix overly permissive regex in push parser

  34. 3.16.0

    16 Jan 2023
    • Security

      Adds vulnerability detection to prevent use of --upload-pack and --receive-pack without explicitly opting in.

    • Support the use of -B in place of the default -b in checkout methods

    • Include restricting the use of git push --exec with other allowUnsafePack exclusions, thanks to @stsewd for the suggestion.

  35. 3.15.1

    30 Nov 2022
    • Resolves an issue whereby non-strings can be passed into the config switch detector.

  36. 3.15.0

    12 Nov 2022
    • Disables the use of inline configuration arguments to prevent unitentionally allowing non-standard remote protocols without explicitly opting in to this practice with the new allowUnsafeProtocolOverride property having been enabled.

    • Upgrade repo dependencies - lerna and jest

  37. 3.14.1

    17 Sep 2022
    • Add version parsing support for non-numeric patches (including "built from source" style 1.11.GIT)

  38. 3.14.0

    4 Sep 2022
    • Create the abort plugin to allow cancelling all pending and future tasks.

    • Add .version to return git version information, including whether the git binary is installed.

  39. 3.13.0

    22 Aug 2022
    • Increase the level of deprecation notices for use of simple-git/promise, which will be fully removed in the next major

    • Allow supplying just one of to/from in the options supplied to git.log

    • Use shared test utilities bundle in simple-git tests, to enable consistent testing across packages in the future

  40. 3.12.0

    8 Aug 2022
    • Add a new configuration option to enable trimming white-space from the response to git.raw

  41. 3.11.0

    30 Jul 2022
    • Added fields updated + deleted branch info to fetch response, closes #823

    • Add prettier configuration and apply formatting throughout.

  42. 3.10.0

    25 Jun 2022
    • Support for importing as an ES module with TypeScript moduleResolution node16 or newer by adding
      simpleGit as a named export.

  43. 3.9.0

    22 Jun 2022
    • Branches that have been checked out as a linked work tree will now be included in the BranchSummary output, with a linkedWorkTree property set to true in the BranchSummaryBranch.

  44. 3.8.0

    18 Jun 2022
    • Support for additional log formats in diffSummary / log / stashList.

      Adds support for the --numstat, --name-only and --name-stat in addition to the existing --stat option.

    • Update CI environments to run build and test in node v18, drop node v12 now out of life.

    • Update debug dependency to latest 4.x

  45. 3.7.1

    23 Apr 2022
    • Resolves issue whereby renamed files no longer appear correctly in the response to git.status.

  46. 3.7.0

    19 Apr 2022
    • Enable the use of types when loading with module-resolution

    • Timeout plugin no longer keeps short lived processes alive until timeout is hit

  47. 3.6.0

    10 Apr 2022
    • Show full commit hash in a CommitResult, prior to this change git.commit would result in a partial hash in the commit property if core.abbrev is unset or has a value under 40. Following this change the commit property will contain the full commit hash.

  48. 3.5.0

    29 Mar 2022
    • Security

      Resolves potential command injection vulnerability by preventing use of --upload-pack in git.clone

  49. 3.4.0

    18 Mar 2022
    • Use null separators in git.status to allow for non-ascii file names

  50. 3.3.0

    11 Mar 2022
    • Security

      Resolves potential command injection vulnerability by preventing use of --upload-pack in git.fetch

  51. 3.2.6

    17 Feb 2022
    • Resolve issue in prePublish script

  52. 3.2.4

    13 Feb 2022
    • Release with changesets

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.