0.2.1 • Published 7 years ago

freekite-version-control v0.2.1

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago

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 \ 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 \ The path is relative to repo's root directory.
0.2.1

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago