pull
Fetch and merge commits from a remote repository (Currently, only fast-forward merges are implemented.)
param | type [= default] | description |
---|---|---|
core | string = 'default' | The plugin core identifier to use for plugin injection |
fs [deprecated] | FileSystem | The filesystem containing the git repo. Overrides the fs provided by the plugin system. |
dir | string | The working tree directory path |
gitdir | string = join(dir,'.git') | The git directory path |
ref | string | Which branch to fetch. By default this is the currently checked out branch. |
corsProxy | string | Optional CORS proxy. Overrides value in repo config. |
singleBranch | boolean = false | Instead of the default behavior of fetching all the branches, only fetch a single branch. |
fastForwardOnly | boolean = false | Only perform simple fast-forward merges. (Don't create merge commits.) |
noGitSuffix | boolean = false | If true, do not auto-append a .git suffix to the url . (AWS CodeCommit needs this option) |
username | string | See the Authentication documentation |
password | string | See the Authentication documentation |
token | string | See the Authentication documentation |
oauth2format | string | See the Authentication documentation |
headers | object | Additional headers to include in HTTP requests, similar to git's extraHeader config |
emitter [deprecated] | EventEmitter | Overrides the emitter set via the 'emitter' plugin. |
emitterPrefix | string = '' | Scope emitted events by prepending emitterPrefix to the event name. |
author | Object | passed to commit when creating a merge commit |
committer | Object | passed to commit when creating a merge commit |
signingKey | string | passed to commit when creating a merge commit |
autoTranslateSSH | boolean | Attempt to automatically translate SSH remotes into HTTP equivalents |
fast | boolean = false | use fastCheckout instead of regular checkout |
noSubmodules | boolean = false | If true, will not print out an error about missing submodules support. TODO: Skip checkout out submodules when supported instead. |
return | Promise<void> | Resolves successfully when pull operation completes |
To monitor progress events, see the documentation for the 'emitter'
plugin.
Example Code:
await git.pull({
dir: '$input((/))',
ref: '$input((master))',
singleBranch: $input((true))
})
console.log('done')