git-commands
v0.1.0
Published
Execute git command using Node.js
Downloads
56
Maintainers
Readme
git-commands
nodejs操作git
Execute git command using Node.js
Install
npm i git-commands --save
Usage
const Git = require('git-commands')
const git = new Git({ reps: 'your git repository path' })
// status
console.log( git.command('status') )
// pull
console.log( git.command('pull') )
// checkout
console.log( git.command('checkout master') )
// push
console.log( git.command('push origin master') )