Skip to content

nikkhn/gitrunner

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#GitRunner

Codeship Status for tqc/gitrunner

Runs simple git commands and parses the result.

##Installation

npm install gitrunner

##Usage

var gitrunner = require("gitrunner");

gitrunner.<command>(<path>,function(result) {})

gitStatus

Returns

{
    isRepo: true,
    changedFiles: []
}

gitRemotes

Returns

{
    origin: 'git@github.com:tqc/gitrunner.git'
}

gitCurrentBranch

Returns

"master"

gitCurrentTrackingBranch

Returns

"origin/master"

fullStatus

A high level command that calls several of the lower level functions. Result is

{
    isRepo: true,
    path: 'c:\\git\\gitrunner',
    changedFiles: [
        'README.md'
        ],
    branch: 'master',
    remotes: {
        origin: 'git@github.com:tqc/gitrunner.git'
        },
    remoteBranch: 'origin/master'
}

runGit

For anything else, you can access git more directly:

gitrunner.runGit(folder, ['remote', '-v'], function(statusCode, output) {})

About

Node module that runs simple git commands and parses the result.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%