freekite-version-control

0.2.1 • Public • Published

Freekite Version Control

A nodegit(libgit2) wrapper for controlling freekite's data versions.

Installation

npm install --save git+http://zhangzeming@git.sankuai.com/scm/~zhangzeming/freekite-version-control.git

API Documentation

Class: History

const History = require('freekite-version-control');
const path = require('path');

// Create a new History instance at repoPath.
const repoPath = '';
const history = new History(path.resolve(repoPath));

// Make some changes in the repo.

// Create a commit of these changes.
history.pushAll();

contructor(dir)

  • dir <String> Directory path where to store versioned data.

The History instance relates to a git repository. If the directory specified by dir is already a git repo, it is used. Otherwise, a new git repo will be created at dir.

history.pushAll()

This method will add all changing files to staging area and create a commit to current branch.

history.pushFile(filepath)

  • filepath <String> The path is relative to repo's root directory.

Readme

Keywords

Package Sidebar

Install

npm i freekite-version-control

Weekly Downloads

1

Version

0.2.1

License

ISC

Last publish

Collaborators

  • devxleo