git-ss
Save a snapshot of a directory to git.
Installation
npm install git-ss
# or
yarn add git-ss
Usage
CommonJS
const { pushToGit } = require('git-ss');
async function takeSnapshot() {
await pushToGit('./mydata', 'https://github.com/hosso/mybackup.git');
}
takeSnapshot();
TypeScript
import { pushToGit } from 'git-ss';
async function takeSnapshot() {
await pushToGit('./mydata', 'https://github.com/hosso/mybackup.git');
}
takeSnapshot();