Keeps in sync a folder and their files with a folder of a git repository.
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 git@github.com: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 = 'git@github.com:some-org/some-repo.git';
sendToGit(source, destination, remote);
Type: string
Array
Required
Glob or array of globs to read.
Type: string
Required
Relative destination path.
Type: string
Required
git repository url.
type: Object
Type: string
Default: 'master'
Branch to add and push the changes.
Type: string
Default: 'Release'
Commit message for the changes.
- send-to-git-cli CLI for this module.
Feel free to dive in! Open an issue or submit PRs.
send-to-git follows the Contributor Covenant Code of Conduct.