send-to-git
v1.0.0
Published
Add folders and their files to a git repo from anyplace, also keeps them in sync
Downloads
3
Readme
Node.js v6.5 or newer is required.
Via the yarn client:
$ yarn add send-to-git
Via the npm client:
$ npm install --save send-to-git
Example to add the content of the folder ./some-files
to [email protected]:some-org/some-repo.git
on the folder public_html
.
import sendToGit from 'send-to-git';
const source = './some-files/**/*.*';
const destination = './public_html';
const remote = '[email protected]:some-org/some-repo.git';
sendToGit(source, destination, remote);
sendToGit(source, destination, remote, [options])
source
Type: string
Array
Required
Glob or array of globs to read.
destination
Type: string
Required
Relative destination path.
remote
Type: string
Required
git repository url.
options
type: Object
branch
Type: string
Default: 'master'
Branch to add and push the changes.
commitMessage
Type: string
Default: 'Release'
Commit message for the changes.
Feel free to dive in! Open an issue or submit PRs.
send-to-git follows the Contributor Covenant Code of Conduct.