Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    git-controlpublic

    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) Build Status

    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 repository myLib, you could access its git-control repository instance using myLib.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

    install

    npm i git-control

    Downloadsweekly downloads

    14

    version

    0.0.6

    license

    none

    repository

    githubgithub

    last publish

    collaborators

    • avatar