NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #2815 most downloaded on npm
Simple GIT interface for node.js
Last release 9 days ago
26 Sep 2026
Release timing varies
gaps range from 8 days to 9 months
Most releases are documented
notes for 53 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
277 releases · first in 2013
Use author email field that respects mailmap
add support for getting the current value of a git configuration setting based on its name.
One column per quarter.
task callback types defined as single function type
move log task to separate task builder
log task to separate task builder (0712f86)scope argument in listConfig to return a specific scope's configuration (0685a8b)true and false in DiffResultTextFile | DiffResultBinaryFile to aid type assertions. (8059099)Nothing published for this version
Nothing published for this version
allow setting the scope of git config add to work on the local, global or system configuration.
create the spawnOptions plugin to allow setting uid / gid owner for the spawned git child processes.
Nothing published for this version
git.cwd can now be configured to affect just the chain rather than root instance.
Nothing published for this version
Support enabling / disabling debug logs programmatically.
errorDetectionPlugin to handle creating error messages when tasks fail.
Nothing published for this version
Nothing published for this version
While use of the ListLogSummary type is deprecated in favour of the new LogResult, the alias type should also support the default generic DefaultLogFi…
no-response auto-generated comment (16fe73f)ListLogSummary type is deprecated in favour of the new LogResult, the alias type should also support the default generic DefaultLogFields to allow downstream consumers to upgrade to newer 2.x versions without the need to specify a generic. (508e602), closes #586Nothing published for this version
Nothing published for this version
Nothing published for this version
Add deprecation notice to git.silent
git binary (via its -c argument as a prefix to any other
arguments). Eg: to supply some custom http proxy to a git pull command, use
simpleGit('/some/path', { config: ['http.proxy=someproxy'] }).pull()git.silentrun to runTask in git coreAdds a root: boolean property to the CommitResult interface representing whether the commit was a 'root' commit (which is a commit that has no parent,
root: boolean property to the CommitResult interface representing whether the commit was a 'root' commit
(which is a commit that has no parent, most commonly the first commit in a repo).Reinstates native support for node.js v10 by removing use of ES6 constructs
Update type definition for git.mergeFromTo to be the MergeResult returned when using the more generic git.merge method. Thanks to @ofirelias for the p
git.mergeFromTo to be the MergeResult returned
when using the more generic git.merge method.
Thanks to @ofirelias for the pull request.Adds support for git.applyPatch to apply patches generated in a git diff to the working index, TypeScript consumers can make use of the ApplyOptions t
Adds support for git.applyPatch to apply patches generated in a git diff to the working index,
TypeScript consumers can make use of the ApplyOptions type definition to make use of strong types
for the supported options. Thanks to @andreterron for the pull request.
Integration tests converted to TypeScript to ensure type safety across all tests.
Nothing published for this version
Resolves an issue whereby using git.log with a callback (or awaiting the promise created from the now deprecated simple-git/promise import) would fail…
git.log with a callback (or awaiting the promise created from the now deprecated
simple-git/promise import) would fail to return the response to the caller.Passing another data type has long been considered an error, but now a deprecation warning will be shown in the log and will be switched to an error i…
simple-git with node.js
versions 11 and below.git.commit, the first argument must be a string or array of strings. Passing another data type has long
been considered an error, but now a deprecation warning will be shown in the log and will be switched to an error
in version 3.git.commit whereby a commit that included only deleted lines would be parsed as though the
deletions were inclusions.pull, push and pushTags parameter types updated to match new functionality and tests switched to TypeScript to ensure they are kept in sync
pull, push and pushTags parameter types updated to match new functionality and tests switched to TypeScript to ensure they are kept in syncUpgrade debug dependency and remove use of now deprecated debug().destroy()
debug dependency and remove use of now deprecated debug().destroy()master to mainAdds support for git hash-object FILE and git hash-object -w FILE with new interface git.hashObject(...), with thanks to @MiOnim
git hash-object FILE and git hash-object -w FILE
with new interface git.hashObject(...), with thanks to @MiOnimAdds string[] to the set of types supported as options for git.log
string[] to the set of types supported as options for git.logLogOptions should be intersection rather than union types
LogOptions should be intersection rather than union typesNothing published for this version
move the command/task option processing function to TypeScript
Nothing published for this version
git pull (and by extension git merge) adds remote message parsing to the PullResult type
git pull (and by extension git merge) adds remote message parsing to the PullResult typeremoteMessages.objects of type RemoteMessagesObjectEnumeration to capture the objects transferred in fetch and push.git.mv rewritten to fit the TypeScript tasks style.
git.mv rewritten to fit the TypeScript tasks style.renames some interfaces for consistency of naming, the original name remains as a type alias marked as @deprecated until version 3.x:
TaskParser type to describe a task's parser function and creates the LineParser utility to simplify line-by-line parsing of string responses.@deprecated until version 3.x:
resolves an issue whereby the git.checkoutBranch method would not pass the branch detail through to the underlying child process.
git.checkoutBranch method would not pass the branch detail through to the underlying child process.Further to 2.13.0 includes all (non-empty) remote: lines in the PushResult, including remote: lines used for other parser results (ie: pullRequestUrl
2.13.0 includes all (non-empty) remote: lines in the PushResult,
including remote: lines used for other parser results (ie: pullRequestUrl etc).Further to 2.13.0 adding support for parsing the reponse to git.push, adds support for the pull request message used by gitlab.
2.13.0 adding support for parsing the reponse to git.push, adds support for the pull request message
used by gitlab..push and .pushTags rewritten as v2 style tasks. The git response is now parsed and returned as a PushResult
.push and .pushTags rewritten as v2 style tasks. The git response is now parsed and returned as a
PushResult
Pull and merge rewritten to fit the TypeScript tasks style.
Integration tests updated to run through jest directly without compiling from nodeunit
Nothing published for this version
Nothing published for this version
git.checkout now supports both object and array forms of supplying trailing options.
git.checkout now supports both object and array forms of supplying trailing options.import simpleGit from "simple-git";
await simpleGit().checkout("branch-name", ["--track", "remote/branch"]);
await simpleGit().checkout(["branch-name", "--track", "remote/branch"]);
await simpleGit().checkout({ "branch-name": null });
git.init now supports both object and array forms of supplying trailing options and now
parses the response to return an InitResult;import simpleGit, { InitResult } from "simple-git";
const notSharedInit: InitResult = await simpleGit().init(false, [
"--shared=false",
]);
const notSharedBareInit: InitResult = await simpleGit().init([
"--bare",
"--shared=false",
]);
const sharedInit: InitResult = await simpleGit().init(false, {
"--shared": "true",
});
const sharedBareInit: InitResult = await simpleGit().init({
"--bare": null,
"--shared": "false",
});
git.status now supports both object and array forms of supplying trailing options.import simpleGit, { StatusResult } from "simple-git";
const repoStatus: StatusResult = await simpleGit().status();
const subDirStatus: StatusResult = await simpleGit().status(["--", "sub-dir"]);
git.reset upgraded to the new task style and exports an enum ResetMode with all supported
merge modes and now supports both object and array forms of supplying trailing options.import simpleGit, { ResetMode } from "simple-git";
// git reset --hard
await simpleGit().reset(ResetMode.HARD);
// git reset --soft -- sub-dir
await simpleGit().reset(ResetMode.SOFT, ["--", "sub-dir"]);
simpleGit() task runner, only the tasks it returns.expect(simpleGit().then).toBeUndefined();
expect(simpleGit().init().then).toBe(expect.any(Function));
.checkIsRepo() updated to allow choosing the type of check to run, either by using the exported CheckRepoActions enum or the text equivalents ('bare',
.checkIsRepo() updated to allow choosing the type of check to run, either by using the exported CheckRepoActions enum
or the text equivalents ('bare', 'root' or 'tree'):
checkIsRepo(CheckRepoActions.BARE): Promise<boolean> determines whether the working directory represents a bare repo.checkIsRepo(CheckRepoActions.IS_REPO_ROOT): Promise<boolean> determines whether the working directory is at the root of a repo.checkIsRepo(CheckRepoActions.IN_TREE): Promise<boolean> determines whether the working directory is a descendent of a git root..revparse() converted to a new style task
Enables support for using the default export of simple-git as an es module, in TypeScript it is no longer necessary to enable the esModuleInterop flag
simple-git as an es module, in TypeScript it is no
longer necessary to enable the esModuleInterop flag in the tsconfig.json to consume the default
export.promise.ts source from simple-git published artifactpromise.js in the project root.await git.log having imported from root simple-gitawait on git.log without having supplied a callback would ignore the leading options
object or options array.Nothing published for this version
Nothing published for this version
Updated to the outputHandler type to add a trailing argument for the arguments passed into the child process.
outputHandler type to add a trailing argument for the arguments passed into the child process.simple-git
to the DEBUG environment variable. git.silent(false) can still be used to explicitly enable logging and is
equivalent to calling require('debug').enable('simple-git').The main export from simple-git no longer shows the deprecation notice for using the .then function, it now exposes the promise chain generated from t…
.then and .catch can now be called on the standard simpleGit chain to handle the promise
returned by the most recently added task... essentially, promises now just work the way you would expect
them to.simple-git no longer shows the deprecation notice for using the
.then function, it now exposes the promise chain generated from the most recently run
task, allowing the combination of chain building and ad-hoc splitting off to a new promise chain.
simple-git import rather than needing
simple-git/promise, see examples in the ReadMe or in the consumer tests.Tasks that previously validated their usage and rejected with a TypeError will now reject with a
TaskConfigurationError.
Tasks that previously rejected with a custom object (currently only git.merge when the auto-merge fails)
will now reject with a GitResponseError where previously it
was a modified Error.
git.clean(...) will now return a CleanSummary instead of the raw string datagit.raw(...) now accepts any number of leading string arguments as an alternative to the
single array of strings.all git.remote related functions converted to TypeScript
git.remote related functions converted to TypeScriptall git.subModule related functions converted to TypeScript
git.subModule related functions converted to TypeScriptadd new git.listConfig to get current configuration
git.listConfig to get current configurationgit.addConfig supports a new append flag to append the value into the config rather than overwrite existingall git.branch related functions converted to TypeScript
git.branch related functions converted to TypeScriptgit.deleteLocalBranches to delete multiple branches in one callgit.deleteLocalBranches and git.deleteLocalBranch now support an optional forceDelete flag.tags, .addTag and .addAnnotatedTag converted to TypeScript, no backward compatibility changes
.tags, .addTag and .addAnnotatedTag converted to TypeScript, no backward compatibility changesAdds detection for includeIf.<condition>.path , thanks to @NotAFlightRisk for identifying the vulnerability
98864c6: Updates ahead of the v4 release for simple-git.
Adds support for TypeScript declaration maps
Exports the isGitEnvKey helper to detect whether an environment variable can be used to configure a git operation
Adds detection for includeIf.<condition>.path, thanks to @NotAFlightRisk for identifying the vulnerability
c427fba: Additional argument parser vulnerability checks:
include.path, filter.*.processurl.*.insteadOf1bb14df: Vulnerability detection expanded to include pager.*, uploadpack.packObjectsHook, difftool.*.cmd and use of the GIT_CONFIG_PARAMETERS environment variable
Thanks to @threalwinky and @nuc13us for identifying.
dfeb116: Vulnerability detection expanded to cover configuration delivered through path-taking global options, where
the dangerous value is a file on disk rather than a token simple-git can inspect:
--exec-path names the directory git loads built-in commands and remote helpers from, and is blockedallowUnsafeExec category along with the GIT_EXEC_PATH environment variable (previouslyallowUnsafeConfigPaths)--git-dir, --work-tree and -C cause git to read the configuration of the repository they name, andallowUnsafeConfigPathsThese options are only detected when supplied before the git sub-command and with a value - used as getters
(git.raw('rev-parse', '--git-dir')) or as task options (git.raw('commit', '-C', 'HEAD~1')) they are
unaffected.
d762810: Add allowUnsafeExec detection to rebase -x and rebase --exec.
Thanks to @gdegrange for the vulnerability report.
d762810: Add allowUnsafeCommandBinaries detection to configuring trailer.<token>.cmd and trailer.<token>.command.
Thanks to @sec-reex for the vulnerability report.
Updated dependencies [98864c6]
If your application depended on any functions with a name starting with an _, the upgrade may not be seamless,
please only use the documented public API.
git.log date format is now strict ISO by default (ie: uses the placeholder %aI) instead of the 1.x default of
%ai for an "ISO-like" date format. To restore the old behaviour, add strictDate = false to the options passed to
git.log.
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →