0.0.6 • Published 9 years ago
git-control v0.0.6
NOTE: git-control is no longer maintained because excellent projects that do the same thing like nodegit exist, and i strongly recommend using them instead.
git-control (beta)
A node module that helps you perform git operations on a repository. To start, all operations are build arround Promises/A promises for asynchronious implementation, but there is a plan to support synchronious commands too.
Getting Started
Install the module with: npm install git-control
and then:
var git = require('git-control'),
newRepo = git.repo({
path: '../path/to/repo', //default to '.'
gitDir: '../.git', //default to path + '/.git',
workTree: 'path/to/work/tree' // default to path
});
newRepo.printInfo(); //output usefull information about the status.
###Available commands
- exec, main function that is used by all other commands, execute the given git command, ex:
repo.exec('status');
- log
- status
- tag
- submodule, (NOTE: exports also submodules, so if you have a submodule called
jquery
in your main repositorymyLib
, you could access itsgit-control
repository instance usingmyLib.submodule.jquery
) - branch
- fetch
- checkout
- pull
- add
- commit
- printInfo
Documentation
(Coming soon)
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
TODO
- Implement tests (in progress)
- Support more operations
- Support synchronious operations
License
Originally Written by Aboubakr Gasmi and is licensed under the MIT license