simple-git
4.1.0 · 16 Nov 2026MIT15.5M / weekRepositorynpmAtom feed
278 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 2.x
2.14.0
20 Jul 2020Resolves an issue whereby the
git.checkoutBranchmethod would not pass the branch detail through to the underlying child process.
2.13.2
17 Jul 2020Further to
2.13.0includes all (non-empty)remote:lines in thePushResult, includingremote:lines used for other parser results (ie:pullRequestUrletc).
2.13.1
16 Jul 2020Further to
2.13.0adding support for parsing the reponse togit.push, adds support for the pull request message used by gitlab.
2.13.0
16 Jul 2020.pushand.pushTagsrewritten as v2 style tasks. The git response is now parsed and returned as a PushResultPull and merge rewritten to fit the TypeScript tasks style.
2.13.0 - Upgraded Pull & Merge and parser for Push
.pushand.pushTagsrewritten as v2 style tasks. The git response is now parsed and returned as a PushResultPull and merge rewritten to fit the TypeScript tasks style.
2.12.0
8 Jul 2020Resolves an issue whereby the
git.tagsmethod could not be chained or used as an async/promise.
2.11.0
25 Jun 2020Until now,
simple-gitreject all pending tasks in the queue when a task has failed. From2.11.0, only tasks chained from the failing one will be rejected, other tasks can continue to be processed as normal, giving the developer more control over which tasks should be treated as atomic chains, and which can be run in parallel.To support this, and to prevent the issues seen when
gitis run concurrently in too many child processes,simple-gitwill limit the number of tasks running in parallel at any one time to be at most 1 from each chain (ie: chained tasks are still run in series) and at most 5 tasks across all chains ( configurable by passing{maxConcurrentProcesses: x}in thesimpleGitconstructor).Add support to
git.status()for parsing the response of a repo that has no commits yet, previously it wouldn't determine the branch name correctly.Resolved a flaw introduced in
2.9.0wherebycheckoutLocalBranchwould silently fail and not check out the branch
2.10.0
23 Jun 2020git.checkoutnow supports both object and array forms of supplying trailing options.git.initnow supports both object and array forms of supplying trailing options and now parses the response to return an InitResult;git.statusnow supports both object and array forms of supplying trailing options.
2.10.0 - trailing options in checkout, init, status, reset & bug-fix awaiting a non-task
git.checkoutnow 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.initnow 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.statusnow 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.resetupgraded to the new task style and exports an enumResetModewith 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"]);bug-fix: It should not be possible to await the
simpleGit()task runner, only the tasks it returns.
expect(simpleGit().then).toBeUndefined(); expect(simpleGit().init().then).toBe(expect.any(Function));
2.9.0
20 Jun 2020.checkIsRepo()updated to allow choosing the type of check to run, either by using the exportedCheckRepoActionsenum or the text equivalents ('bare', 'root' or 'tree'):.revparse()converted to a new style task
2.8.0
19 Jun 2020Enables support for using the default export of
simple-gitas an es module, in TypeScript it is no longer necessary to enable theesModuleInteropflag in thetsconfig.jsonto consume the default export.
2.7.1
18 Jun 2020Reading the note…
2.7.0
16 Jun 2020Updated to the
outputHandlertype to add a trailing argument for the arguments passed into the child process.All logging now uses the debug library. Enable logging by adding
simple-gitto theDEBUGenvironment variable.git.silent(false)can still be used to explicitly enable logging and is equivalent to callingrequire('debug').enable('simple-git').
2.6.0
7 Jun 2020TL;DR -
.thenand.catchcan now be called on the standardsimpleGitchain to handle the promise returned by the most recently added task... essentially, promises now just work the way you would expect them to.The main export from
simple-gitno longer shows the deprecation notice for using the.thenfunction, 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.Promise / async interface and TypeScript types all available from the
simple-gitimport rather than needingsimple-git/promise, see examples in the ReadMe or in the consumer tests.
2.6.0 - Native Promises, Typed Errors, TypeScript Importing, Git.clean and Git.raw
Native Promises
TL;DR -
.thenand.catchcan now be called on the standardsimpleGitchain to handle the promise returned by the most recently added task... essentially, promises now just work the way you would expect them to.The main export from
simple-gitno longer shows the deprecation notice for using the.thenfunction, 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.See the unit and integration tests.
See the typescript consumer test.
TypeScript Importing
Promise / async interface and TypeScript types all available from the
simple-gitimport rather than needingsimple-git/promise, see examples in the ReadMe or in the consumer tests.
Typed Errors
Tasks that previously validated their usage and rejected with a
TypeErrorwill now reject with aTaskConfigurationError.Tasks that previously rejected with a custom object (currently only
git.mergewhen the auto-merge fails) will now reject with aGitResponseErrorwhere previously it was a modifiedError.
Git Clean
git.clean(...)will now return aCleanSummaryinstead of the raw string data
Git Raw
git.raw(...)now accepts any number of leading string arguments as an alternative to the single array of strings.
2.5.0
17 May 2020All
git.remoterelated functions converted to TypeScript
2.4.0
5 May 2020All
git.subModulerelated functions converted to TypeScript
2.3.0
3 May 2020Add new
git.listConfigto get current configurationgit.addConfigsupports a newappendflag to append the value into the config rather than overwrite existing
2.2.0
30 Apr 2020All
git.branchrelated functions converted to TypeScriptAdd new
git.deleteLocalBranchesto delete multiple branches in one callgit.deleteLocalBranchesandgit.deleteLocalBranchnow support an optionalforceDeleteflag
2.1.0
28 Apr 2020.tags,.addTagand.addAnnotatedTagconverted to TypeScript, no backward compatibility changes
2.0.0
28 Apr 2020If 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.logdate format is now strict ISO by default (ie: uses the placeholder%aI) instead of the 1.x default of%aifor an "ISO-like" date format. To restore the old behaviour, addstrictDate = falseto the options passed togit.log.
- 1.x
1.113.0 – 1.132.020 releases without a noteShow each
- 1.132.012 Mar 2020no note
- 1.131.026 Jan 2020no note
- 1.130.019 Jan 2020no note
- 1.129.013 Dec 2019no note
- 1.128.06 Dec 2019no note
- 1.127.06 Dec 2019no note
- 1.126.031 Aug 2019no note
- 1.125.031 Aug 2019no note
- 1.124.028 Jul 2019no note
- 1.123.027 Jul 2019no note
- 1.122.019 Jul 2019no note
- 1.121.014 Jul 2019no note
- 1.120.010 Jul 2019no note
- 1.119.09 Jul 2019no note
- 1.118.03 Jul 2019no note
- 1.117.01 Jul 2019no note
- 1.116.019 Jun 2019no note
- 1.115.015 Jun 2019no note
- 1.114.015 Jun 2019no note
- 1.113.08 May 2019no note
1.112.0
3 May 2019Reading the note…
1.111.0
3 May 2019Reading the note…
1.110.0
23 Mar 2019Reading the note…
1.109.0
22 Mar 2019Reading the note…
1.108.0
22 Mar 2019Reading the note…
1.107.0
5 Nov 2018Reading the note…
1.106.0
26 Oct 2018Reading the note…
1.105.0
11 Oct 2018Reading the note…
1.104.0
2 Oct 2018Reading the note…
1.103.0
29 Sep 2018Reading the note…
1.102.0
22 Sep 2018Reading the note…
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.