![]() ![]() branch() uses the supplied options to run any arguments supported by the branch command. Returns the unmodified string response from stdout of the git binary. applyPatch(patches, ) applies an array of string patches (as generated by git diff), optionally configured with the supplied options to set any arguments supported by the apply command. applyPatch(patch, ) applies a single string patch (as generated by git diff), optionally configured with the supplied options to set any arguments supported by the apply command. Tags will be sorted by semantic version number by default, for git versions 2.7 and above, use the -sort option to set a custom sort. ![]() List all tags, use the optional options object to set any options allows by the git tag command. Runs any supported git tag commands with arguments passed as an array of strings. Removes files from source control but leaves them on disk Removes any number of files from source control When supplied the options argument contain any options accepted by git-revert. The commit can be any regular commit-ish value (hash, name or offset such as HEAD~2) or a range of commits (eg: master~5.master~2). Reverts one or more commits in the working copy. Rebases the repo, options should be supplied as an array of string parameters supported by the git rebase command, or an object of options (see details below for option formats). When the git process returns a non-zero signal on exit and it printed something to stderr, the command will be treated as an error, otherwise treated as a success. Update the local working copy database with changes from the default remote repo and branchĪttaches a handler that will be called with the name of the command being run and the stdout and stderr readable streams created by the child process running that command, see examplesĮxecute any arbitrary array of commands supported by the underlying git binary. Update the local working copy database with changes from a remote repo Update the local working copy database with changes from the default remote repo and branch, when supplied the options argument can be a standard options object either an array of string commands as supported by the git fetch. Set environment variables to be passed to the spawned child processes, see usage in detail below.Ĭalls a simple function in the current step Sets the command to use to reference git, allows for using a git binary not available on the path environment variable commit(message,, options, handlerFn)Ĭommits changes on the named files with the supplied message, when supplied, the optional options object can contain any other parameters to pass to the commit command, setting the value of the property to be a string will add name=value to the command string, setting any other type of value will result in just the key from the object being passed (ie: just name), an example of setting the author is below Immediately clears the queue of pending tasks (note: any command currently in progress will still call its completion callback)Ĭommits changes in the current working directory with the supplied message where the message can be either a single string or array of strings to be passed as separate arguments (the git command line interface converts these to be separated by double line breaks) Generate cat-file detail, options should be an array of strings as supported arguments to the cat-file commandĬhecks if filepath excluded by. ![]() addAnnotatedTag(tagName, tagMessage, handlerFn)Īdds an annotated tag to the head of the current branchĪdds a lightweight tag to the head of the current branch API APIĪdds one or more files to be under source control In v2 (deprecation notices were logged to stdout as console.warn in v2). Upgrading from v2 will be seamless for any application not relying on APIs that were marked as deprecated ![]() Upgrading from Version 2įrom v3 of simple-git you can now import as an ES module, Common JS module or as TypeScript with bundled typeĭefinitions. Git binary, or where possible a parsed interpretation of the response.įor type details of the response for each of the tasks, please see the TypeScript definitions. Whether using a trailing callback or a Promise, tasks either return the raw string or Buffer response from the Parallel tasks section for more information on how to run tasks in parallel rather than in series. If any of the steps in the chain result in an error, all pending steps will be cancelled, see the configure the instance with a custom configuration property const git: SimpleGit = simpleGit ( '/some/path', ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |