freekite-version-control
v0.2.1
Published
A nodegit wrapper for freekite's version control.
Downloads
9
Readme
Freekite Version Control
A nodegit(libgit2) wrapper for controlling freekite's data versions.
Installation
npm install --save git+http://[email protected]/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.